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

Any help with this text color change script?

Any help?

Here is the script that I'm using :

--NOTE THAT I'M NEW TO SCRIPTING--


while true do 
script.Parent.SurfaceGui.TextLabel.TextColor3 = Color3.new(0,204,255)
wait(.1) 
script.Parent.SurfaceGui.TextLabel.TextColor3 = Color3.new(0,255,0)
wait(.1)
script.Parent.SurfaceGui.TextLabel.TextColor3 = Color3.new(255,255,0)
wait(.1)
script.Parent.SurfaceGui.TextLabel.TextColor3 = Color3.new(255,0,0)
wait(.1)
script.Parent.SurfaceGui.TextLabel.TextColor3 = Color3.new(153,0,153)
wait(.1)
script.Parent.SurfaceGui.TextLabel.TextColor3 = Color3.new(0,0,255)
wait(.1)
end


Not working when I run, play in Studio, and playing on another account.

Any help?

or was it just a stupid error

1 comment

0

I have a model you should check out, It is documented and might be of some help to you in the future.

1 answer

✓ Accepted answer

You're pretty close - but Color3 arguments should be numbers out of 255.

This should work for you. And note - if you find yourself repeating code remember to use variables :)

local label = script.Parent.SurfaceGui.TextLabel

while true do 
	label.TextColor3 = Color3.new(0,204/255,1)
	wait(.1) 
	label.TextColor3 = Color3.new(0,1,0)
	wait(.1)
	label.TextColor3 = Color3.new(1,1,0)
	wait(.1)
	label.TextColor3 = Color3.new(1,0,0)
	wait(.1)
	label.TextColor3 = Color3.new(153/255,0,153/255)
	wait(.1)
	label.TextColor3 = Color3.new(0,0,1)
	wait(.1)
end

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