Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Finding a players ping?

I have been trying to find a way to get the player ping without using remote events/functions. The players ping is shown is studio when running a test server e.g. test-> start server with one player, then click view->stats->network

I cannot find a way to access this info but I did find another way to access packet info. Click here for the test plugin I have been working on.

Installing this plugin and running a server will output some network info on the client side:-

Actual bytes per second sent         971
Actual bytes per second received     510
Message bytes per second sent        692
Message bytes per second resent      0
Message bytes per second pushed      692
Message bytes per second processed   230
Message bytes per second ignored     0
Total bytes sent                     723420
Total bytes received                 478599
Total message bytes sent             535613
Total message bytes resent           0
Total message bytes pushed           535613
Total message bytes received         292007
Total message bytes ignored          0
Messages in send buffer, by priority 0,0,0,0
Bytes in send buffer, by priority    0,0,0,0
Messages in resend buffer            0
Bytes in resend buffer               0
Current packetloss                   0.0%
Average packetloss                   0.0%
Elapsed connection time in seconds   649

Could this info be used to show the client how good their connection is? or is there another way to find a clients ping?

2 answers

✓ Accepted answer

You can't

Roblox doesn't supply an API for network stats such as the ping, so the only way for you to get the ping is for you to ask the network - Which would involve you invoking a RemoteFunction and measuring the time it took for the round trip.

1 comment

0

I guess its too much to ask from Roblox why give frame rate and not network stats XD

Try getting the current tick, sending a remotefunction that returns something (ex:"pong") (very important the function is not async), and then get the tick again. Subtract the two, and there's the player's ping!

3 comments

0

I know but that would increase server load which i dont want to do when it is allready recorded by the client

0

It shouldn't be that big of a deal unless you're refreshing the ping constantly.

0

I will be looking to use one of the big servers which holds somthing like 50 players

This discussion is preserved as it was. New answers, comments, and votes are closed.