how do get the delta time between client and server?
1 Like
Just supply the time as a parameter when firing the remote event, and calculate the delta time when the event was received using this.
-- On the server:
myRemote:FireAllClients(os.clock())
-- on the client:
myRemote.OnClientEvent:Connect(function(sendTime)
local deltaTime = os.clock() - sendTime
end)
Note that this works the other way around, not just server to client.
1 Like
I’m finding this works great in studio but os.clock is vastly different between client and server for real places…not useful
edit: if using os.time() instead it seems consistent enough between server and client…but not sure how reliable it would be.
2 Likes