RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a plate survival script with 2 events and only have 15 players in max"
-- server script local maxPlayers = 15 local players = game:GetService("Players") local plates = game.Workspace.Plates:GetChildren() local events = {"Shrink", "Grow"} function startGame() while true do wait(10) local currentPlayers = players:GetPlayers() if #currentPlayers >= maxPlayers then for _, player in pairs(currentPlayers) do local plate = plates[math.random(1, #plates)] player.Character.HumanoidRootPart.CFrame = plate.CFrame end while #currentPlayers > 0 do local event = events[math.random(1, #events)] if event == "Shrink" then for _, plate in pairs(plates) do plate.Size = plate.Size - Vector3.new(1, 0, 1) end elseif event == "Grow" then for _, plate in pairs(plates) do plate.Size = plate.Size + Vector3.new(1, 0, 1) end end wait(10) end end end end startGame()