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

Text box not working?

Asked by
mkjp87 0
9 years ago

I'm trying to get a text box (the scripts parent) to change its text but when ever I change the BrickColor of flag the text doesn't change.

flag = game.Workspace.Flag.Flag

if flag.BrickColor.Name == "Bright red" then
    script.Parent.Text = "Flag: Hostile"
    elseif flag.BrickColor.Name == "Bright green" then
    script.Parent.Text = "Flag: Ark Empire"
    elseif flag.BrickColor.Name == "Medium stone grey" then
    script.Parent.Text = "Flag: Neutral"



end

Answer this question