Question about MouseEnter, MouseLeave events

You could make a custom button script. What I mean is that you can get the mouse position when the player clicks and check which button is being pressed knowing its position and size. This way, you would only have to connect a single event. However, it would be tedious to make a hovering effect. Note that MouseEnter and MouseLeave are not quite reliable since they fail too often…

By the way, if you are willing to destroy those buttons when they are no longer needed, you don’t have to worry about events connected to them. When you call Destroy(), you are inherently disconnecting all the instance’s connections as well as those of its children.

In order to enhace performance, you could try optimizing your scripts. This thread might help. Also, having numerous unanchored parts or too many collisions can drop fps.

[color=orange]Edit: thanks for ignoring[/color] :sob:

1 Like