Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Is it possible to get the ping of a player?

Asked by
novipak 70
8 years ago

I remember playing SFOTH (I believe), and it showed my ping in a GUI. How can this be done?

I would've started on the script already if I had any idea as to where to start. But since I don't I have to ask straight up and I'm sorry for that.

Anyways, it would be helpful if anyone could let me know how to get the ping of a player.

2 answers

Log in to vote
1
Answered by 8 years ago

In a local script you can do this, its a basic way to do it, check the output to check your ping

local currentPing = tick() -- epoch time
while wait(1) do
    currentPing = (currentPing()-tick())
    print(currentPing)
end

If you wanted FPS then you could also do this

while wait(1) do
    print(game:GetService("Workspace"):GetRealPhysicsFPS())
end
Ad
Log in to vote
4
Answered by 8 years ago

I agree with DevScripting for FPS, but not for how ping works. Ping, is a time that is calculated between source and client, Here's my ping script, it's simple but usefull

http://www.roblox.com/Player-Ping-Meter-item?id=318169331

Here's the thing, if you don't want the model. Create a RemoteFunction that returns true on any condition, ask the client to invoke at that remote function then count the time it took for the remote function to return true. That's all

Answer this question