function GetPing()
local ping = 300-((1/wait())*10)
if ping < 1 then
ping = 1
elseif ping > 300 then
ping = 300
end
return math.floor(ping)
end
function GetGUINumber()
local number = (GetPing()/300)
if number > 1 then
return 1
else
return number
end
end
while wait(0.25) do
local X = ((1-wait())*0.75)
local R = GetGUINumber()
local G = (1-GetGUINumber())
script.Parent.MainFrame.PingChart.Size = UDim2.new(X,0,0.75,0)
script.Parent.MainFrame.PingChart.BackgroundColor3 = Color3.new(R,G,0)
script.Parent.MainFrame.PingText.Text = "Ping: "..GetPing()
end -- I have this but the numbers are random and not the real ping.

5 comments
why post this irrelevant script if its not even correlating with your question...?
How is this irrelevant?
You could have the client ping to the server (via a remote), and get the difference of time with
tick.Might want to check out different pages on the same topic: https://scriptinghelpers.org/questions/24578/is-it-possible-to-get-the-ping-of-a-player
Thank you.