Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make a player's right arm point in the direction of the player's mouse?

I'm not sure how to start this either.

1 answer

You can use the CFrame.new(Vector3,Vector3) constructor to make a CFrame whose position is at the first Vector3 argument, whose lookVector aims from its position towards the second Vector3 argument.

rightshoulder.C1=CFrame.new(0,0,0.5)*CFrame.Angles(-math.pi/2,0,0)
while true do
    wait()
    rightshoulder.C0=CFrame.new(Vector3.new(1.5,0.5,0),Torso.CFrame:inverse()*aimat)
end
--[[Where
aimat is the position of the Player's mouse.
Vector3.new(1.5,0.5,0) is the position of the Player's shoulder
Torso.CFrame:inverse()*aimat is the relative position of the aimat point
]]

This discussion is preserved as it was. New answers, comments, and votes are closed.