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

Can you Help me about TextColoer3(TextLabel)?

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

✓ Accepted answer

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 comment

1

Good thanks you :D

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

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

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