last time i was trying to made First Person system so i made a script just can apply player look up and down.
the problem is , its just work on local but its doesn’t work on server, if someone can help me because i really didnt understand, some stuff work normally with localscript and some other doesnt work
on local player:
on the server:
parent script is “StarterCharacterScripts”
script :
local char = game.Players.LocalPlayer.Character
local cam = game.Workspace.CurrentCamera
local neck = char:WaitForChild("Torso"):WaitForChild("Neck")
local rotateChar = char:WaitForChild("HumanoidRootPart"):WaitForChild("RootJoint")
local LeftHip = char:WaitForChild("Torso"):WaitForChild("Left Hip")
local RightHip = char:WaitForChild("Torso"):WaitForChild("Right Hip")
game["Run Service"].RenderStepped:Connect(function()
neck.C0 = CFrame.new(neck.C0.Position)
* (CFrame.Angles(math.pi/2,math.pi,0)
* CFrame.Angles(-cam.CFrame.LookVector.Y * 1/2,0,0)
)
rotateChar.C0 = CFrame.new(neck.C0.Position)
* (CFrame.Angles(math.pi/2,math.pi,0)
* CFrame.Angles(-cam.CFrame.LookVector.Y * 1/2,0,0)
)
LeftHip.C0 = CFrame.new(LeftHip.C0.Position)
* (CFrame.Angles(0,-math.pi/2,0)
* CFrame.Angles(0,0,-cam.CFrame.LookVector.Y * 1/1.5)
)
RightHip.C0 = CFrame.new(RightHip.C0.Position)
* (CFrame.Angles(0,math.pi/2,0)
* CFrame.Angles(0,0,-cam.CFrame.LookVector.Y * 1/1.5)
)
end)
-- pls help :D