Categories > Coding > Lua >

Ping/Latency local script for a screen gui


Posts: 13

Threads: 8

Joined: Jan, 2022

Reputation: 0

  • 0

Posted

So ive been trying to make a ping local script like i did for my Fps script but  everything ive been trying nothing has worked
The Fps script:

local fps = 0

local rs = game:GetService("RunService")

rs.RenderStepped:Connect(function()
	fps = fps + 1
end)

while true do
	script.Parent.Text = "FPS: "..fps
	fps = 0
	wait(1)
end

RealNickk

am h3x0r

patron

Posts: 3053

Threads: 147

Joined: Feb, 2020

Reputation: 35

  • 1

Replied

local RemoteFunction = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.MutePlayerRequest -- Cannot created from client it has to be SOME remote function.

local Start = tick()
RemoteFunction:InvokeServer()
local Latency = tick() - Start

print(math.floor(Latency * 1000)) -- Latency in miliseconds.

4b5951d5-1b9b-407b-b514-78eb46591564

Posts: 13

Threads: 8

Joined: Jan, 2022

Reputation: 0

  • 0

Replied

@RealNickk where do i put the script?

RealNickk

am h3x0r

patron

Posts: 3053

Threads: 147

Joined: Feb, 2020

Reputation: 35

  • 0

Replied

@TobeXen ...........what?

4b5951d5-1b9b-407b-b514-78eb46591564



Users viewing this thread:


( Members: 0, Guests: 1, Total: 1 )