So i have made a script where it gives a 10 second intermission before everyone is given a sword. Script goes like this:
t = 10 repeat s.Value = "You will be given a sword in "..t.." seconds, stay alive" wait(1) t = t -1 until t == 0 player = 1 local plrs = game.Players:GetChildren() repeat local clone = game.ServerStorage.ClassicSword:Clone() clone.Parent = plrs[player].Backpack clone.Script.Disabled = false player = player +1 until player == #ingame end
The line it errors on is line 11.
Anyone got a fix for this?
local serverStorage = game:GetService("ServerStoage") local players = game:GetService("Players") local swordTool = serverStorage.ClassicSword local intermissionTime = 10 for secondsLeft = intermissionTime, 1, -1 do local secondFormat = (secondsLeft > 1 and "seconds" or "second") s.Value = "You will receive your sword in "..secondsLeft..' '..secondFormat.."; stay alive!" end for _,player in pairs(players:GetPlayers()) do local sword = swordTool:Clone() sword.Script.Disabled = false sword.Parent = player.Backpack end