I'm making a gui, and I want an image to spin when you highlight the frame that contains it with your mouse. I am pretty much completely lost here. All I need to know is how to detect when the mouse is hovering over a frame. Any help is appreciated, thanks!
P.S. Sorry for the lack of a script to work with :\
To detect of the mouse is hovering over the frame do this
local mouse = game.Players.LocalPlayer:GetMouse() local GUI = --get GUI Object local Hover() if mouse.X >= GUI.X.Scale and mouse.X <= GUI.X.Scale + GUI.Size.X.Scale and mouse.Y >= GUI.Y.Scale and mouse.Y <= GUI.Y.Scale + GUI.Size.Y.Scale then return true else return false end
I've never done this before but I looked up a few things and this should work
These forums have what you are looking for.
https://devforum.roblox.com/t/know-whatever-gui-the-mouse-is-hovering/269656/2
https://developer.roblox.com/en-us/api-reference/function/BasePlayerGui/GetGuiObjectsAtPosition
You get the list of GUIs, check if it is a certain one, then you apply the effects.