Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

t I forgot how to loop I want to loop an intermission script but I forgot how?

script that I want to loop here

local tvalue = script.Parent.StatusTag 

function beginGame()
	for i = 30, 0, -1 do 
		wait(1)
		tvalue.Text = "Intermission: " .. i .. "" 
		if i == 0 then
			tvalue.Text = "Hide!" 
			target = CFrame.new(-298.717, 374.494, 95.422) 
for i, player in ipairs(game.Players:GetChildren()) do 
   if player.Character and player.Character:FindFirstChild("Torso") then 
      player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0) 
   endtar
end
		end --Ends
	end
end

if game.Players.NumPlayers > 0 then 
	beginGame()
end
local tvalue = script.Parent.StatusTag 

function beginGame()
	for i = 300, 0, -1 do 
		wait(1)
		tvalue.Text = "Game: " .. i .. "" 
		if i == 0 then
			tvalue.Text = "Game Over!" 
			target = CFrame.new(-177.9, 353.059, -542.5) 
			for i, player in ipairs(game.Players:GetChildren()) do 
				if player.Character and player.Character:FindFirstChild("Torso") then 
					player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0) 
				end
			end
		end --Ends
	end
end

if game.Players.NumPlayers > 0 then 
	beginGame()
end

1 comment

0

lol answered my own thing

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.