I'm making a paintball game, and when I played it with my friend, he suggested to make it an FPS. So, I tried to make an FPS mode, but I'm having trouble with one thing: how do you make your arm point towards the mouse? I looked in the Urist's pistol model, but I don't get it. What is a simple way to make the right arm point towards the mouse?
When I tried it, the arm pointed in the wrong direction. I used this code:
tool.Equipped:Connect(function(mouse)
local char = tool.Parent
local joint = char.Torso['Right Shoulder']
while tool.Parent == char do
wait()
joint.C0 = CFrame.new(joint.C0.p, mouse.hit.p)
end
end)
I tried copying the code from the pistol model. It did work, but at one point it deleted my character,
