Answered by
4 years ago Edited 4 years ago
Well, you can use MouseEnter
function provided by Roblox. It will detect whether the mouse has entered the TextButton
. Also, you can use MouseLeave
to detect if the mouse left the TextButton
.
A sample code:
03 | local TextButton = script.Parent |
06 | local sound = Instance.new( "Sound" ) |
07 | sound.Parent = TextButton |
08 | sound.Name = "TestSubject" |
15 | local Sound = TextButton:FindFirstChild( "TestSubject" ) |
22 | TextButton.MouseEnter:Connect(Enter) |
23 | TextButton.MouseLeave:Connect(Leave) |
Lemme know if it helps!
Closed as Not Constructive by Ziffixture
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?