Gui text colour not changing

So i’m trying to create this simple effect that when you cursor enters a text box the color of the text will change but i am getting this error:

22:24:15.277 - Players.SpacialEthanRB.PlayerGui.ScreenGui.LocalScript:18: attempt to call a userdata value

I’ve tried this:

script.Parent.Frame.close.MouseEnter:Connect(function()
	game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.close.TextColor3(255, 0, 0)
end)

and this:

script.Parent.Frame.close.MouseEnter:Connect(function()
	script.Parent.Frame.close.TextColor3(255, 0, 0)
end)

Same error

I am very bad at gui’s and this isn’t my first devfourm post asking for gui help so sorry if the answer is simple.

2 Likes

That will not work. You need to set its text color like
script.Parent.Frame.close.TextColor3 = Color3.fromRGB(255,0,0)

3 Likes

As Btkelley said, you need to set the textcolor like that.
EDIT: I did not deserve to be marked as solution

1 Like

Thank you so much and @ML4Bzero Thank you too

Thank you this is what i was trying to do:
robloxapp-20200513-2244489.wmv (278.8 KB)