How to disable server script for local player

I am making an FPS game and want to transfer client arm position to the server for every player to see. The effect makes the client jitter since the arms are updating for everyone, including me.

I want to be able to keep the client from getting these updates for smooth first person gameplay.

On client:

On server:

Client Localscript:

RunService:BindToRenderStep("ShiftLock", Enum.RenderPriority.First.Value, function()
--smooth movement based on camera
    local Neck = TweenService:Create(neck, TweenInfo.new(0.18, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {C0 = CFrame.new(0,1,0) * CFrame.Angles(math.rad(90)+(x/2),math.rad(-180),math.rad(0))}):Play()
	local RArm = TweenService:Create(rarm, TweenInfo.new(0.09, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {C0 = CFrame.new(1,0.5,0) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)+(x/1.2))}):Play()
	local LArm = TweenService:Create(larm, TweenInfo.new(0.09, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {C0 = CFrame.new(-1,0.5,0) * CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)+(-x/1.2))}):Play()
		
	if count == 0 then
		Limbs:FireServer(neck.C0, rarm.C0, larm.C0) --fires positions to server
		count = 10
	else
		count -= 1
	end

end)

Server script:

Limbs.OnServerEvent:Connect(function(plr, neck, rarm, larm)
	plr.Character:WaitForChild("Torso"):FindFirstChild("Neck").C0 = neck
	plr.Character:WaitForChild("Torso"):FindFirstChild("Right Shoulder").C0 = rarm
	plr.Character:WaitForChild("Torso"):FindFirstChild("Left Shoulder").C0 = larm
end)

Help is appreciated.

Could you run the changes on Clients? Making Changes on Server is not that nice as you think it is

Is it as simple as firing to all clients except for mine?

What i mean is that if you run the Changes on clients instead of Server it will be easier to render since it won’t clog the Network bandwith
However, Clients can often lie about what they are perceiving(via exploit) so you should still keep the arm’s orientation in numbers as server to prevent any hacks
Also the method you’re using is very easy to Exploit, a exploiter can easily rotate the Arms in the way he wants easily, so you will need a different method.

Can you give me an example of how to best achieve this? I understand what you mean I just am not sure how.

Run the Arm Orientation calculation on the server(to make sure it won’t be exploited), base it on the Direction the player gives(Also make sure it only rotates, moving it would be a easy gateway to exploits)
Use :FireAllClients() to show it to all clients(Send orientation etc.)
I am also working on a similiar Framework that uses a similiar method to this, you can find it here: https://files.catbox.moe/v46y92.rbxl
^(Though note it’s incomplete)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.