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

How to make the players arms follow the camera?

Asked by 4 years ago

Greetings. I am trying to get the players arms to follow the camera to manipulate a first person shooter, I have asked around but unfortunately have answers. Any help with how I could code this myself would be greatly appreciated, thanks.

1 answer

Log in to vote
0
Answered by 4 years ago

"local cam = workspace.CurrentCamera local plr = game:GetService(“Players”).LocalPlayer game:GetService(“RunService”).RenderStepped:connect(function() if plr.Character then local root = plr.Character.HumanoidRootPart if root then root.CFrame = CFrame.new(root.CFrame.p,root.CFrame.p+Vector3.new(cam.CFrame.lookVector.X,0,cam.CFrame.lookVector.Z)) end end end)"

Ad

Answer this question