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

[SOLVED]How do I detect this line of code after its done?

Asked by 10 years ago
if true then

    if game.Players.NumPlayers < 1 then
    while true do
    for i = TIME, 1, -1 do
        status.Value = 'Intermission '..i
        wait(1)
    end
    wait(1)
    break
        end

How would I connect this piece of code to activate another piece of code?

1 answer

Log in to vote
1
Answered by
Hibobb 40
10 years ago

I'm not sure what you mean by another piece of code so a few examples:

if true then
    if game.Players.NumPlayers < 1 then
        for i = TIME,1,-1 do
            status.Value = 'Intermission'..i
            wait(1)
        end
        wait(1)
        SpawnPlayers()--this would call on another function
    end
end
if true then
    if game.Players.NumPlayers < 1 then
        for i = TIME,1,-1 do
            status.Value = 'Intermission'..i
            wait(1)
        end
        wait(1)
        workspace.GameScript.Disabled = false--activating another script
    end
end
if true then
    if game.Players.NumPlayers < 1 then
        for i = TIME,1,-1 do
            status.Value = 'Intermission'..i
            wait(1)
        end
        wait(1)
        for _,v in pairs(game.Players:GetPlayers()) do--just going right onto the next thing
            v.Character:MoveTo(Vector3.new(0,0,0))
        end
    end
end
0
Thank you very much rabidhalofan12345 55 — 10y
Ad

Answer this question