Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

For loop trouble?

Asked by 10 years ago

How do I make it so during the timer loop when it hits 5 seconds the d1 and d2 trasnparency = 1 and maindoor transparency = 0?? Thanks


players = game.Players:GetPlayers() h = Instance.new("Hint",game.Workspace) d1= game.Workspace.d1 d2 = game.Workspace.d2 maindoor = game.Workspace.maindoor dooropensound = game.Workspace.dooropen warmusic = game.Workspace.warmusic while true do wait(1) if game.Players.NumPlayers >=2 then wait(1) h.Text = "Starting the clash soon" wait(2) h.Text = "Ready to battle?" wait(2) for fivetoone = 10,1,-1 do h.Text = "Begins in"..fivetoone wait(1) end wait(1) for o = 1,1 do if maindoor.Transparency == 0 then maindoor.Transparency = 1 maindoor.CanCollide = false d1.Transparency = 0 d2.Transparency = 0 dooropensound:play() warmusic:play() warmusic.Looped = true end end h.Text = "Go" for i,v in pairs(players) do sword = game.Lighting.Sword swordclone = sword:clone() swordclone.Parent = players.Backpack end for timer = 30,1,-1 do wait(1) h.Text = "Time left till battle ends"..timer end warmusic:stop() warmusic.Looped = false else h.Text = "There needs to be 2 or more players to begin the battle.." end end
0
you should add a wait(1) to all the for loops NinjoOnline 1146 — 10y
0
There's no point to add a wait(1) to his loops, and it would prove tedious that ever other player had to wait another second to get a tool. Aethex 256 — 10y

Answer this question