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

Why doesn't this GUI work?

What I am trying to do is when a flag gets captured by a team, count up points for that team. I have points counting up, however, I want the team who has 10 points to win. I have 3 GUIs; 2 GUIs telling which team has what points and another GUI that tells who has won. For some reason, this script does not A) Stop the points from increasing B) Reset the points and C) Change the GUI to the name of the team that wins.

If you can help, please give me an example of what I need to change. Thank you :D Heres the code;

flag = game.Workspace.Flag.Flag
B = script.Parent.Blue
R = script.Parent.Red
Total = false
BValue = B.Text
RValue = R.Text

while wait() do
if Total == false then

	if flag.BrickColor == BrickColor.new("Bright blue") then 
		wait(1)
		B.Text = 1 + B.Text
	elseif flag.BrickColor == BrickColor.new("Bright red") then 
		wait(1)
		R.Text = 1 + R.Text
	
	end
end
end
while wait() do
if BValue.Text == 10 then
		Total = true
		TextLabel.Text = "Blue has won!"
		B.Text = 0
		R.Text = 0
		Total = false
elseif RValue == 10 then
	Total = true
		TextLabel.Text = "Blue has won!"
		B.Text = 0
		R.Text = 0
		Total = false
end
end

1 answer

Roblox has currently broken the coding for GUIs, so that may be why your GUI script isn't working. I'm so sorry. ;(

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