This script makes it so it can limit the amount of people that can join. So like-
Lobby - Max Player 0/1
Player 1: Joins
Player 2: Joins
– Both players can’t leave
function Check()
if #Parent.Adornee.Players:GetChildren() <= Parent.Adornee.Configuration:GetAttribute("MaxPlayers") then
return true
else
return false
end
end
TextButton.MouseButton1Click:Connect(function()
script.Click:Play()
if Player and Player.Character and Player.Character.Humanoid.Health > 0 and not Intermission then --#Parent.Adornee.Players:GetChildren() <= Parent.Adornee.Configuration:GetAttribute("MaxPlayers")
if Check() then
Camera()
Change_Text()
AddPlayer()
end
end
end)