`Player:GetNetworkPing() ` returns 0 despite the value of Settings.IncomingReplicationLag

Reproduction Steps:
Go to Studio Settings > Network > Incoming Replication Lag and set it to a value higher than 0.
Playtest and print Player:GetNetworkPing(), it will return 0 (This happens for server side and client side calls).

image
image

Expected behavior

I expect Player:GetNetworkPing() to respect the value of Incoming Replication Lag.

7 Likes

Found someone internally, we’ll get back to you when we have an update!

5 Likes

Hey, bumping this back up as this is really inconvenient when testing stuff, and results in a lot of lost time for us (given how you’re forced to go into an actual game server to test anything ping-related).
Hopefully this can get looked at soon.

1 Like

Indeed, having the same issue here !

Hmm correct me if I am wrong, but would it be possible as a temporary solution to add the repLag value to the Player:GetNetworkPing()
So if you have set replag to be 5 seconds delay you just do
return Player:GetNetworkPing() +5

This still seems to be broken!

Also linking player:GetNetworkPing() returns IncomingReplicationLag when called in-studio

1 Like

This is intentional behavior, apparently. I posted the same bug a while ago. LocalPlayer:GetNetworkPing() returns 0 even if IncomingReplicationLag is not 0 in Studio - #9 by GroupyClumpy

Thanks for bringing this to our attention, and sorry for the late reply! @XAXA is correct; this is by design. You can read the comment they linked for more details. We don’t have plans to change the existing API, but you can file a feature request for a new one if this is something you would like to see implemented!