So I have a button that when clicked will change its color but for some reason, it won't change how come why?
--|Script|--
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Romans.TextColor3 = "255, 255, 255" script.Parent.TextColor3 = "12, 53, 0" end)
--|locations|--
The script is located in a text button called Carthaginians and Romans is a text button located in a screen GUI along with the Carthaginians button.
P.S.
Sorry for the rushed question if you don't understand just tell me what you don't understand and I'll edit it, and or tell you.
Wrong value, that's a string, it needs a Color3 value. Consider checking output next time. Here's an example of me assigning a variable a color3 value
Note I'm on mobile.
local a=Color3.fromRGB(255,0,255)
TextColor3
takes in a Color3
and not a string
what you want to set it to is actually
Color3.fromRGB(255, 255, 255) -- like this script.Parent.Parent.Romans.TextColor3 = Color3.fromRGB(255, 255, 255)
Roblox Wiki:
Don't forget to mark my answer as the solution if it solved your problem(Upvotes are also very much appreciated) :)