How would I get the part that the player is hovering their cursor over?

I want to make a script so that if a player has their mouse hovered over a part, an outline would appear over the part. I am completely clueless as to how I would get that without it being the player clicking. Thanks for reading or any potential help.

2 Likes

Do you want this to work for any part you hover over or only certain parts?

If it is only certain parts, you can use click detectors and use ClickDetector.MouseHoverEnter to determine what parts are being hovered over.

3 Likes
1 Like

If you want to get the object that the player has their mouse on, you should use Mouse.Target

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.