Is there a way to get the player that's mouse entered a gui?

I have a module script that clones a surface gui and puts it in workspace and whenever a players mouse hovers over it, it makes the gui a little bigger. It works great so far but I’m trying to make a gui appear for the player that’s mouse hovered over it so of course I’ll need to get the player somehow. Any ideas?
image

Are there any arguments? Also Isn’t hover client sided?

1 Like

MouseEnter only works on TextButtons and ImageButtons, you’ll need to use one to detect the signal.
You can use a remote event and fire it to the client who hovered over it

1 Like

It is yea but im just working with what I got haha

Remotes have a player argument. All localscripts can use game.Players.LocalPlayer.

But I cant get the player to invoke

That code should already be in a LocalScript so just use LocalPlayer, what exactly is the problem?

The code is in a module script since local scripts don’t run in workspace.

Is your module running on the client or server?

It’s running server side, currently when someone hovers their mouse over a button it resizes it for everyone haha.

Is this SurfaceGui meant to be fully client-based or certain actions are prompted making a server-wide change to it?

well its meant to be all client based but this was the only way I tried that worked.

find the position of the mouse and mark the location of your ui and then constantly check for it. you can also make an invisible text button to do onmouse enter.

You should be able to place the SurfaceGui inside of StarterGui and change it’s Adornee to the designated part. From there you can put a LocalScript inside of it with all the original functionality and use game.Players.LocalPlayer.

You can just use a local script in StarterPlayerScripts and put the path for button.