I don’t need help scripting anything as I know my script works, but I need advice on how often I should ping the player so I can display their ping. I know it can be resource-demanding on the server but my game is single-player.
My code is here, it is from a remote function which returns the players network stats.
while task.wait(1) do
local result = event:InvokeServer()
local ping = string.format("%0.0f", result*1000)
pingLabel.Text=string.format("Client Ping (Round trip in MS): %s", ping)
end
Could I go lower than 1 second without using a lot of valuable server resources or is 1 too much?