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

How can I get a script to run for everyone at the exact same time?

Asked by
Seenit 80
10 years ago

The script involves playerGui and a Round system. What type of line can make the script run for everyone at once.

0
I have updated my answer. Articulating 1335 — 10y

1 answer

Log in to vote
2
Answered by 10 years ago

Use a for loop to iterate through the players in-game.

for index, player in pairs(Game.Players:GetPlayers()) do
    coroutine.resume(coroutine.create(function()
        player.Character:BreakJoints() --Replace this with any code that you want to run for the player.
    end))
end
0
Yes but when I do this is takes turns instead of doing it at once. For example one player gets a gui before another. Seenit 80 — 10y
0
I see. Please look at my edited code. Articulating 1335 — 10y
0
Thank you so much! Seenit 80 — 10y
Ad

Answer this question