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

Any help with this text color change script?

Asked by 7 years ago

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

0
I have a model you should check out, It is documented and might be of some help to you in the future. GuestRealization 102 — 7y

1 answer

Log in to vote
3
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
7 years ago
Edited 7 years ago

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
Ad

Answer this question