So I have this basic script I'm making, when a users mouse enters the ImageButton, it rotates to 25 degrees, then when the mouse leaves, it goes back to normal.
My question is, can I find which side the users mouse entered on? I am trying to make it so when the user enters on the left side, the rotation will be 155 degrees instead of 25.
Here is my current script (under image button):
local imgbutton = script.Parent
function MouseEnter()
imgbutton.Rotation = -25 --mouse enter on right
--mouse enter on left here
end
function MouseLeft()
imgbutton.Rotation = 0
end
imgbutton.MouseEnter:Connect(MouseEnter)
imgbutton.MouseLeave:Connect(MouseLeft)
What feature can I use to achieve this? I'm extremely confused, and I'm unsure if there is a way to do this, any help is appreciated!

2 comments
So there is no actual ROBLOX feature, or is there one? (thanks for the way to do it too)
Not that I'm aware of but I'm no expert haha. That's how I'd do it :)