How would I make this FE?

So I made a head and arm look at mouse position but it is currently client-sided. how could I make it fe:

plr = game.Players.LocalPlayer;

repeat wait() until plr.Character

char = plr.Character

m = plr:GetMouse()

game["Run Service"].RenderStepped:connect(function()

local c = game.Workspace.CurrentCamera

char.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y),1.55,0)

char.Torso["Left Shoulder"].C0 = CFrame.new(-1,0.5,0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y),-1.55,0)

char.Torso["Neck"].C0 = CFrame.new(0,1,0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y) + 1.55,3.15,0)

end)
1 Like

create a remote event, fire the server with the remote and on that normal script paste the script inside the render stepped function while transferring the local-only vars to the remote event so the server doesn’t say tried to find nil or something

1 Like

do i fire the remote once? so it starts the renderstepped?

1 Like

fire it everytime the render steps basically replace all the camera thing follow arms and stuff with the function firing the server with the remote event

1 Like

wouldn’t that be too much remote event firing just for 1 remote?

1 Like

you’re right, you can maybe instead fire the server when the camera changes position by making a property got changed function and see if the CFrame changed then fire the remote

(don’t forget to remove the renderstepped btw)

2 Likes