I was wondering how to make the thing where the hands and head follow the cursor in fps. I found a script and modified it but i could never find a way to also make it in server side in my POV i can see it but others can’t how do i make this also server sided like a normal fps?
plr = game.Players.LocalPlayer;
repeat
wait()
until plr.Character
char = plr.Character
m = plr:GetMouse()
local IsEquipped = false
local origRightS = char:WaitForChild("Torso"):WaitForChild("Right Shoulder").C0
local origLeftS = char:WaitForChild("Torso"):WaitForChild("Left Shoulder").C0
local origNeck = char:WaitForChild("Torso"):WaitForChild("Neck").C0
local camera = game.Workspace.CurrentCamera
local UIS = game:GetService("UserInputService")
local c = game.Workspace.CurrentCamera
game:GetService("RunService").RenderStepped:Connect(function(delta)
if IsEquipped == true then
if char.Torso:FindFirstChild("Right Shoulder") then
char.Torso["Right Shoulder"].C0 = char.Torso["Right Shoulder"].C0:Lerp(CFrame.new(1, .65, 0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y), 1.55, 0, 0) , 0.4)
end
if char.Torso:FindFirstChild("Left Shoulder") then
char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0:Lerp(CFrame.new(-1, .65, 0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y), -1.55, 0, 0) , 0.4)
end
if char.Torso:FindFirstChild("Neck") then
char.Torso["Neck"].C0 = char.Torso["Neck"].C0:Lerp(CFrame.new(0, 1, 0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y) + 1.55, 3.15, 0), 0.4)
end
else
if char.Torso:FindFirstChild("Right Shoulder") then
char.Torso["Right Shoulder"].C0 = char.Torso["Right Shoulder"].C0:lerp(origRightS, 0.4)
end
if char.Torso:FindFirstChild("Left Shoulder") then
char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0:lerp(origLeftS, 0.4)
end
if char.Torso:FindFirstChild("Neck") then
char.Torso["Neck"].C0 = char.Torso["Neck"].C0:lerp(origNeck, 0.4)
end
end
end)
char.ChildAdded:Connect(function(instance)
for i,v in pairs(char:GetChildren()) do
if v:IsA("Tool") then
if v:FindFirstChild("HoldArmsStill") then
else
IsEquipped = true
end
end
end
end)
char.ChildRemoved:Connect(function(instance)
if instance:IsA("Tool") then
IsEquipped = false
end
end)```