Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a text appear when hovered?

Asked by 3 years ago

So i wanna make a small button that makes a text close to him slowly appear (like in 0.4) when u hover the mouse and when u the mouse leave the text fades away but i dont know how im supposed to do that bc im really bad with that fade thing

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

This Isnt A Request Site But Anyways As Your New

First We Make Variables

local button = script.Parent -- The Script Should Be A LocalScript And Should Be In The Button

Now We Make A Function For The Mouse

button.MouseEnter:Connect(function() -- Function For The Mouse

end)

Now In That Function We Make It Change Text

button.MouseEnter:Connect(function()
    button.Text = "Your Text Here" -- Change The text Here
end)

Now We Need To Know When The Player Isnt Hovering Or When The Players Hovers Once The Text Wont Change So We Make A Function

button.MouseLeave:Connect(function() 
    button.Text = "Your Text Old Text" -- Here Goes The Old text
end)

The End Product Would Look Something Like This

local button = script.Parent-- The Script Should Be A LocalScript And Should Be In The Button

button.MouseEnter:Connect(function() -- Function For The Mouse
    button.Text = "Your Text Here" -- Change The text Here
end)

button.MouseLeave:Connect(function()
    button.Text = "Your Text Old Text" -- Here Goes The Old text
end)

Hope You Found This Helpful :D

Ad

Answer this question