RMB click not working as intended

ukiW
Sun, 04 Feb 2018 18:20:54 +0000
UI

I’ve made a script so that when i right click on a button, it opens up settings for that specific chat box. The problem is, most of the time, it doesn’t open. Here’s the code:

Basically I’m asking if the button is hovered + if settings are already not open (this shouldn’t be the problem). This function is called once RMB is clicked. Is Hovered is kinda retarded and gives me weird results every time i click on the button in game. Here is a screen:

This is how it looks once the the settings are open, however as you can see from the strings above, it only worked in the third try. I’m not sure why this problem pops up. Does anyone have a solution to this, or another way to make the same functionality? I’d really appreciate it.

2 posts - 1 participant