Removed this post dude

removed post why are you here broooooooooooo

Bumped, hopefully someone can answer this.

are you testing this in studio or in game?

I’m testing this in the actual game. In studio, the ping is 0 ms.

I’m not entirely sure how :GetNetworkPing() works. Even for me, it’s extremely lower than what reads on the ServerStats tab in the console (20ms vs 75ms). Maybe it tests your direct connection only to the server itself?

A remote function might give you a better representation for how long the server takes to process information and send it back (Ping+Server Latency). By using a remote function, it will respond later depending on how much information the server is processing, giving you a higher and more realistic ping that moreso reflects the amount of lag you would feel during a game. However it can be inaccurate reflecting your actual connection since the response is dependent on the server’s current processing order/prioritization.

--LocalScript--
local remote = game:GetService("ReplicatedStorage"):WaitForChild("PingRemote") --RemoteFunction
local refreshSpeed = 5

function fetchPing()
	local startTime = os.clock()
	remote:InvokeServer()
	local endTime = os.clock()
	return endTime - startTime
end

while task.wait(refreshSpeed) do
	MainUI.ServerStats.Ping.Text = tostring(math.round(fetchPing() * 1000)).." ms"
end

--ServerScript--
game:GetService("ReplicatedStorage"):WaitForChild("PingFunction").OnServerInvoke = function() return end

lower the multiplaction?
lol limit,.

Thanks! I’ll try this out later.

1 Like

It worked! Thanks so much! It seems more reasonable now.

1 Like