Here a script
local function Start ()
script.Parent.Text = 30
for i=1, 30 do
wait(1)
script.Parent.Text = script.Parent.Text - 1
end
Workspace.Events.Restart:FireAllClients()
end)
Workspace.Events.Start.OnServerEvent:Connect(Start)
--if you see misspelled things please forget it, i'm not in studio
Now, what if i want to make the loop to stop if a there are only _ "playing" player is left.
local function Start ()
local players = workspace.NumberOfPlayers.Value -- lets imagine this int value have the
amount of players currently in the game
local currently = instance.new("intvalue", workspace)
currently.Name = currently
currently.Value = NumberOfPlayers.Value -- sets the number players who is playing
script.Parent.Text = 30
for i=1, 30 do
wait(1)
script.Parent.Text = script.Parent.Text - 1
if currently == 1 then break -- im not used to "break" so if anything is wrong pls tell
end
Workspace.Events.Restart:FireAllClients()
end)
Workspace.Events.Start.OnServerEvent:Connect(Start)
--if you see misspelled things please forget it, i'm not in studio
Now how do i make "currently" negate if a player died?

2 comments
thanks
No problem :)