So today my problem is this:
I made a script whose function is to check if there are more than 2 players in place and then a BoolValue will be active, only I don’t understand what I did wrong in the script:
local Players = game:GetService(“Players”)
local PlayerModels = Players:GetChildren()
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local Players = game:GetService(“Players”)
local PlayerModels = Players:GetChildren()
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local BoolsFolder = ReplicatedStorage.Bools
while BoolsFolder.twoormore.Value == false do
if #PlayerModels >= 2 then
print(“more 2 players in place”)
BoolsFolder.twoormore.Value = true
end
wait()
end
local Players = game:GetService("Players")
local Bool = ... -- Location of your bool value
function Update()
Bool.Value = #Players:GetPlayers()>=2
end
Players.PlayerAdded:Connect(Update)
Players.PlayerRemoving:Connect(Update)
local Players = game:GetService(“Players”)
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local BoolsFolder = ReplicatedStorage.Bools
while BoolsFolder.twoormore.Value == false do
if #Players:GetChildren() >= 2 then
print(“more 2 players in place”)
BoolsFolder.twoormore.Value = true
end
wait()
end