This lags the whole player out in the worst case, this does not happen to the people joining (1-5 people) but over that it starts to happen… we’ve got 3 scripts handling this.
This is the Script. There should not be anything wrong with the local turning script either and sometimes it says it does not find the Neck/Torso part in my model.
local TweenService = game:GetService("TweenService")
local targets = {}
game.ReplicatedStorage.HeadTurn.HeadUpdate.OnServerEvent:connect(function(player,neck,torso)
targets[player.Name] = {neck,torso}
end)
game.Players.PlayerRemoving:connect(function(p)
targets[p.Name] = nil
end)
while wait(.2) do
game.ReplicatedStorage.HeadTurn.HeadUpdate:FireAllClients(targets)
end
this is a part of the head turning script I got
while wait(.2) do
if player.Character:FindFirstChild("Neck") then
game:service'RunService'.Heartbeat:wait()
game.ReplicatedStorage.HeadTurn.HeadUpdate:FireServer(neckpart.Motor6D.C1,torsopart.neck.C0)
end
end
Does anyone have a clue what is going on? Ask away if there is any information I left out
You’re firing the remote events too much. More info on it here. Could the server instead just check for the head? If you’re making an antiexploit your real threat here would be server sided movements.
I get it now. So having a part’s network ownership towards a client will allow the client to move it on the client side at the same time replicating on the server side but if the ownership is towards the server then if a client moves that it won’t replicate? Is this correct?
That’s what I was going to say. I imagine shooters fire events way more rapidly than 5 a second, hell I’m pretty sure I fire events way more rapidly than 5 a second.