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
On line 6 the output sais : then expected near "=" please help me fix this?
1 answer
== 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
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Shouldn't Wait() be lowercase?
Well both Wait and wait reference the function, so it's fine.