I am currently trying to make a IntroGui. To add some effects to the TextButton I added MouseEnter and MouseLeave. But when I test the TextButton, it does not appear anymore.
Here is a link to my other question which was resolved just in case:
https://scriptinghelpers.org/questions/41898/textbuttonvisible-true-not-working
Script:
local TextButton = script.Parent
local Frame = TextButton.Parent
local TextLabel = Frame:WaitForChild('TextLabel')
local TextLabel1 = Frame:WaitForChild('TextLabel1')
local Frame1 = Frame:WaitForChild('Frame1')
local ImageLabel = Frame:WaitForChild('ImageLabel')
local Sound = Frame:WaitForChild('Sound')
wait(10)
TextButton.Visible = true
TextButton.MouseButton1Click:connect(function()
for i = 0,0.5,1 do
Frame.Visible = false
TextLabel.Visible = false
TextLabel1.Visible = false
ImageLabel.Visible = false
TextButton.Visible = false
Frame1.Visible = false
wait(0.05)
end
Sound:Stop()
end)
function hover()
game.StarterGui.IntroGui.TextButton.BackgroundColor3 = (80,80,80)
wait(0.05)
end
function hover2()
game.StarterGui.IntroGui.TextButton.BackgroundColor3 = (50,50,50)
wait(0.05)
end)
script.Parent.MouseEnter:connect(hover)
script.Parent.MouseLeave:connect(hover2)
Please help me, thank you!

3 comments
When you say, "it does not appear anymore," do you mean that the textbutton does not turn visible or do you mean that the effect isn't showing? If you mean the latter, then I recommend that instead of using "game.StarterGui.IntroGui.TextButton", you should use "TextButton" or script.Parent because the StarterGUI is not actually where the Player's GUIs are located.
The TextButton doesn't turn visible. But I fixed it from the answer below by RubenKan but it won't change color when I hover over the TextButton.
That'd be because you change starterGui and not PlayerGui