Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a characters arm point at a part?

Asked by 6 years ago

How do I make a characters arm point at a part? Using the motor6d because the part will move around.

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Using the motor6d's Transform property you just set it to

CFrame.new(Arm.CFrame, Part.CFrame)

and that should work. If the position is off you just need to set it to this instead.

local angles = CFrame.new(Arm.CFrame, Part.CFrame)
angles = angles - angles.p

Make sure you use it in the RunService's "Stepped" function.

Hope this helped

Ad

Answer this question