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

Why doesn't this GUI work?

Asked by 10 years ago

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

Log in to vote
0
Answered by 10 years ago

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

Ad

Answer this question