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

Roblox Studio refuses to load the game client in Team Create?

Asked by 3 years ago
Edited 3 years ago

I once joined my game. well as i meant editing, but once i made changes and save changes and wrote down some scripts, Some weird things started to happen, once i click on "Play" button, it loads infinitely, i only wrote some of my codes.

'LocalScript' on StarterGui
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = replicatedStorage:WaitForChild("RemoteEvent")
local RunService = game:GetService("RunService")
local label = script.Parent

local function ping()
    local send = tick()
    local ping = nil

    remoteEvent:FireServer()

    local receive; receive = remoteEvent.OnClientEvent:Connect(function()
        ping = tick() - send 
    end)

    wait(1)
    receive:Disconnect()

    return ping and math.floor(ping) or 999
end

RunService.RenderStepped:connect(function(delta)
    label.Text = ping()
end)
~~~~~~~~~~~~~~~~~~

'Ping!' on ServerScriptService local replicatedStorage = game:GetService("ReplicatedStorage") local remoteEvent = replicatedStorage:WaitForChild("RemoteEvent")

remoteEvent.OnServerEvent:Connect(function(player) remoteEvent:FireClient(player) wait() end) ~~~~~~~~~~~~~~~~~

(All stole from devforum)

Can someone help me

Answer this question