The issue
When using remote events/functions in studio the player’s position is out of sync.
This bug becomes worse should you enable replication lag in studio
Demonstration
To demonstrate this issue I’ve created a button ingame that when pressed clones the character on the server and client the instant it can.
Client Code
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.RemoteEvent:FireServer()
ClonePlayer(game.Players.LocalPlayer) --simple function that clones the char
end)
Server Code
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
if player.Character then
ClonePlayer(player) --same function as in client
end
end)
Green is client position and Red is server position
In Studio with 0 artificial ping at 16 walkspeed (dev console reported ~70ms ping)
In Studio with 500ms artificial ping at 16 walkspeed
In studio with 0 artificial ping at 32 walkspeed (dev console reported ~70ms ping), this amount of difference can have a big effect on testing in studio
Expected Behaviour
In a live server at around ~150ms ping at 16 walkspeed (acceptable behaviour)
reproduction file
repro.rbxl (26.0 KB)
This has a very big effect on the game that I’m currently working on, its a very high speed game where walkspeeds can reach way above the 70s so testing in studio at all is highly inaccurate