Changing text colour issue

Hi i got issue changing text colour,
I have no idea what is wrong so id be greatful if someone helped!
this is the code and output:

Players.EruptingStudiosGD.PlayerGui.Options.Pad.Format.ColourOption.Open.LocalScript:2: Expected identifier when parsing expression, got ‘[’

    script.Parent.Parent.Parent.Parent.Parent.Pad.Box.Text.TextColor3 = ["0,0,0"]
2 Likes

try this instead

    script.Parent.Parent.Parent.Parent.Parent.Pad.Box.Text.TextColor3 = Color3.new(0, 0, 0)
3 Likes

I assume Text is not the property Text of the Text instance, thus try to do:

local Target =  script.Parent.Parent.Parent.Parent.Parent:WaitForChild("Pad").Box:WaitForChild("TextItem")

Target.TextColor3 = Color3.new(0,0,0) -- or use Color3.fromRGB
1 Like

the code didnt work, but thanks

1 Like

Output said:
Infinite yield possible on Infinite yield possible on 'Players.EruptingStudiosGD.PlayerGui.Options.Pad.Box:WaitForChild(“TextItem”)

1 Like

script.Parent.Parent.Parent.Parent.Parent.Pad.Box.Text.TextColor3 = Color3.new(0,0,0)

1 Like

Any error outputs in console?

This text will be blurred

1 Like

thats exactly what the other guy said

1 Like

whats the error then? (the script that weakroblox35 posted)

1 Like

Can you screenshot the explorer of where your TextItem actually is, compared to the script you’re using to change its colour? Your infinite yield probably stems from incorrectly defining your text label.

As for the colour, Color3.new(0,0,0) should replace the squared brackets you were using.

1 Like


here it is, i hope you have a solution

1 Like

GuiObject.TextColor3 = Color3.new(1, 1, 1)
Where ‘GuiObject’ is a reference to object that you want to change the text color of.

1 Like

Use textLabel.TextColor3 = Color3.new(0,0,0), it should work.

1 Like

script.Parent.Parent.Parent.Parent.Parent.Pad.Box.TextColor3 = Color3.new(0, 0, 0)

Don’t include .Text

1 Like

once button was clicked i couldnt type anything

1 Like

it didnt work but thank you for trying to help

1 Like

you didnt have to click the button for it to turn green, it turned green automatically without clicking

1 Like

If you want it to turn green when clicking do this:

Open.MouseButton1Click:Connect(function()
 script.Parent.Parent.Parent.Parent.Parent.Pad.Box.TextColor3 = Color3.new(0,0,0)--Enter color here
end)
1 Like

it didnt work and only Open was underlined red

1 Like

That’s because you have to define open…
Open is the button for player to click to change the textcolor…

1 Like