Here's My code
local ImageButton = script.Parent ImageButton.MouseEnter:connect(function() ImageButton.Image = "601721143" local ImageButton = script.Parent end) local ImageButton = script.Parent ImageButton.MouseLeave:connect(function() --Sets up the function for when the mouse hovers over said GuiObject ImageButton.Image = "619984177" local ImageButton = script.Parent end)
If my mouse leaves It wont chnage back.
Try this:
local ImageButton = script.Parent ImageButton.MouseEnter:Connect(function() ImageButton.Image = "601721143" ImageButton.MouseLeave:Wait() ImageButton.Image = "619984177" end)
You defined ImageButton so many times and you don't have to. Just define it once. Also, Instead of using two functions I used one. This is shorter and a bit cleaning in my opinion.
Let me know if this works for you.