script.parent.Text = "Roblox >" Wait(1) script.Parent.TextTransparency = 1 Wait(0.5) script.Parent.TextTransparency = 0 if script.Parent.Text = color a then script.Parent.TextColor3 = 26, 255, 10 end
==
is the equality operator, =
is the assignment operator. Furthermore, your then
should be on the same line as the rest of the if statement:
script.parent.Text = "Roblox >" Wait(1) script.Parent.TextTransparency = 1 Wait(0.5) script.Parent.TextTransparency = 0 if script.Parent.Text = color a then script.Parent.TextColor3 = 26, 255, 10 end
The next problem is that color a
is not a valid identifier, so this code still won't work. Remember, an identifier must begin with a letter or underscore, and can be followed by any combination of zero or more letters, underscores, and numbers. Perhaps colorA
is what you're looking for.
script.parent.Text = "Roblox >" Wait(1) script.Parent.TextTransparency = 1 Wait(0.5) script.Parent.TextTransparency = 0 if script.Parent.Text == colorA then script.Parent.TextColor3 = 26, 255, 10 end
We'll still have another error here, at the line that sets the text color. The property needs to be a Color3
, but you're trying to assign it to 26
(remember that in multiple variable assignment, additional results will be discarded). Additionally, Color3
components must be from 0 to 1, not 0 to 255, so we should use the Color3.fromRGB()
constructor function:
script.parent.Text = "Roblox >" Wait(1) script.Parent.TextTransparency = 1 Wait(0.5) script.Parent.TextTransparency = 0 if script.Parent.Text == colorA then script.Parent.TextColor3 = Color3.fromRGB(26, 255, 10) end