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

Can you Help me about TextColoer3(TextLabel)?

Asked by 9 years ago
if script.Parent.Parent.Control.Value == 0 then
while true do
script.Parent.a.SurfaceGui.TextLabel.Text = "This train is Not in service"
script.Parent.b.SurfaceGui.TextLabel.Text = "Please exit this train"
script.Parent.b.SurfaceGui.TextLabel.TextColor3 = "[255,0,0]"
wait(5)
script.Parent.a.SurfaceGui.TextLabel.Text = "and wait for the next train"
script.Parent.b.SurfaceGui.TextLabel.Text = "Thanks for your patience."
script.Parent.b.SurfaceGui.TextLabel.TextColor3 = "[255,0,0]"
wait(5)
end
end

it dosen't work How should l make the TextColor3 Change ?

3 answers

Log in to vote
0
Answered by 9 years ago

You need to change text color 3 like brick color. Like this

TextLabel.TextColor3 = BrickColor.Red().Color--change the color to whatever you like :)
1
Good thanks you :D 7785543 2 — 9y
Ad
Log in to vote
1
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
9 years ago

To add on to what SirTwoFace said, you do not HAVE to do it like a BrickColor, since it's a Color3 value. However, Color3 only takes a number between 0 and 1, so if you want to do it by 255, you must divide it by 255.

On top of that, it is not a string, so don't put it in quotes. It should be like this:

TextLabel.TextColor3 = Color3.new(1,0,0)

--Or,

TextLabel.TextColor3 = Color3.new(255/255,0,0) --Same thing as before
Log in to vote
-2
Answered by 9 years ago

Your code:

if script.Parent.Parent.Control.Value == 0 then
while true do
script.Parent.a.SurfaceGui.TextLabel.Text = "This train is not in service"
script.Parent.b.SurfaceGui.TextLabel.Text = "Please exit this train"
script.Parent.b.SurfaceGui.TextLabel.TextColor3 = "[255,0,0]" --<- TextColor3 is ***NOT*** a string. It's a freaking Color3.
wait(5)
script.Parent.a.SurfaceGui.TextLabel.Text = "and wait for the next train"
script.Parent.b.SurfaceGui.TextLabel.Text = "Thanks for your patience."
script.Parent.b.SurfaceGui.TextLabel.TextColor3 = "[255,0,0]"
wait(5)
end
end

Here is mine:

if script.Parent.Parent.Control.Value == 0 then
    while true do
        script.Parent.a.SurfaceGui.TextLabel.Text = 'This train is not in service.'
        script.Parent.b.SurfaceGui.TextLabel.Text = 'Please exit this train.'
        script.Parent.b.SurfaceGui.TextLabel.TextColor3 = Color3.new(255/255, 0/255, 0/255)
        wait(5)
        script.Parent.a.SurfaceGui.TextLabel.Text = "and wait for the next train"
        script.Parent.b.SurfaceGui.TextLabel.Text = "Thanks for your patience."
        script.Parent.b.SurfaceGui.TextLabel.TextColor3 = Color3.new(255/255, 0/255, 0/255)
        wait(5)
    end
end

Answer this question