--[[while wait(2) do
	local t = tick()
	script.Parent.PingRemote:InvokeServer()
	local ping = ((tick() - t) / 2) * 1000 -- time it takes in milliseconds
	local txt = string.format("Ping : %dms", ping)
	if ping > 130 then
		txt = string.format("%s (Warning high ping)",txt)
	end
	txt = string.format("%s Server location: %s",txt, script.Parent.PingLocation.Value)
	script.Parent.Text = txt
end]]


while wait(2) do
	local t = tick()
	script.Parent.PingRemote:InvokeServer()
	local ping = ((tick() - t) / 2) * 1000 -- time it takes in milliseconds
	local txt = string.format("%d ms", ping * 2)
	script.Parent.Text = txt
end

