You can apply a torque to a rotational driveshaft, or a force to a translational driveshaft, in the following ways:
A torque or force source accepts a physical signal input and originates, from its mechanical conserving port, a mechanical connection line carrying that torque or force.
The Simscape™ Driveline™ simulation solves for the motion of the spinning or sliding driveshaft, given the torque or force that it is subject to. Therefore you cannot also subject that same driveshaft to motion actuation.
Simscape Driveline might generate an error if the combined torques and forces at any given node have a nonzero sum.