Maybe I’m using :GetNetworkPing wrong, but just to test and see the kind of values it spits out (since the Documentation doesn’t give anything about using it), I wrote some simple code looping through and grabbing ping.
-- The following code is written in a Server Script, sitting in ServerScriptService.
local players = game:GetService("Players")
local serverRun = true
while serverRun == true do
local plrs = players:GetPlayers()
for _, plr in pairs(plrs) do
local ping = plr:GetNetworkPing()
print(ping)
end
wait(5)
end
The results are simply “0” every time it prints, whereas you can see my ping according to the Performance Stats shows quite the opposite.
Edit: I tested in-game (play button on the play page) rather than in-studio. If I re-call, playing in studio runs the “server” locally, so then it would of course output 0?
GetNetworkPing no longer is horrifically broken like it used to be. GetNetworkPing accurately displays a decimal number now, rather than simply reporting back “0”.
Incorrect. You can run it on the server by calling for a player, with the attached function. However,if the function is run in a local script then you can only call the local player.
If this was the case back then, multiplying 0 by 1000 would not change the fact it was 0. Printing
a float doesn’t round it to the nearest int.
I specifically stated that I didn’t test in studio to avoid this exact reason.
This post is resolved, the problem that I faced one year ago no longer exists.