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

How would i make a script if there are more than 2 players a loop starts?

Asked by
hokyboy 270 Moderation Voter
4 years ago
local Status = script.Parent.Status
local RepStorage = game.ReplicatedStorage:WaitForChild("Status")


repeat until
game.Players.Player -- here i need help

2 answers

Log in to vote
2
Answered by 4 years ago
local Status = script.Parent.Status
local RepStorage = game.ReplicatedStorage:WaitForChild("Status")


repeat until
if #Players:GetPlayers() == 2 then
        --Put script here
    end

Sorry if I incorrectly space the script, I’m on an iPad.

Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
local Status = script.Parent.Status
local RepStorage = game.ReplicatedStorage:WaitForChild("Status")
repeat wait(1) until #game.Players:GetPlayers() >= 2
-- Loop goes here

Answer this question