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

after i added this function the script stopped working?

It stopped working after i added the "ChooseColor()" function...

--//Values

Intermission = 5

--//Functions

function ChangeText(Text)
	local Players = game.Players:GetPlayers()
	for i = 1, #Players do
	Players[i].PlayerGui.CountdownGui.MainFrame.ActivityLabel.Text = Text
end
end

function StartIntermission()
	local Players = game.Players:GetChildren()
	for i = Intermission, 0, -1 do
	ChangeText("Choose your Color: " ..i)
	wait(1)
end
end

function ChooseColor()
	local Players = game.Players:GetChildren()
	local Colors = {"Blue", "Red", "Yellow", "Purple"}
	local n = math.random(1, 4)
	local Color = Colors[n]
	print("Color Chosen: "..Color)
		for i = 1, #Players do
		Players[i].PlayerGui.CountdownGui.MainFrame.ActivityLabel.Text = "Color Chosen: "..Color
	wait(1)
	local ColorPart = game.Workspace.Colors:FindFirstChild(""..Color)
	wait(0.1)
	ColorPart.Transparency = 1
	ColorPart.CanCollide = false
end

--//Main

while true do
	StartIntermission()
	ChangeText("Choosing Color...")
	ChooseColor()
	wait(1)
end
end

1 answer

✓ Accepted answer

This is a pretty easy issue that can be hard to notice, you need to have "end" on line 36 and remove "end" from line 45

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