How to use the mouse to detect something

Hey, I want to make a surface gui grow in size once a players mouse hovers over it. Anyone know how?

(I have literally no idea, haven’t worked with mouse alot)

Im sure you could use the MouseEnter Event.

The MouseEnter of the GuiObject should be what you need.

Remember that you have to put hte surfacegui in startergui and the Adornee of it to be on the part you want it to be on and put the localscript somewhere in the SurfaceGui itself

Wait you can use surfaceguis in startergui?

Yes, if you try to put the SurfaceGui in workspace and a localscript in it, the localscript will not work.

For it to work properly (only the player hovering will see it increase), it has to be in StarterGui with its Adornee property being the part you want it displayed on

1 Like