iDannz [Breno] Posted March 19, 2019 Share Posted March 19, 2019 When using destroyElement in GUI widgets, doesnt trigger event onClientMouseLeave if the cursor is inside the destroyed element, please fix Link to comment
Moderators IIYAMA Posted March 20, 2019 Moderators Share Posted March 20, 2019 If something doesn't exist anymore, then there is nothing to leave from. In fact it will only cause more problems for the onClientMouseLeave event. An event can't just trigger without it's source. Link to comment
iDannz [Breno] Posted March 20, 2019 Author Share Posted March 20, 2019 I use it to check if localplayers cursor is inside gui, i add event to mouse enter, and setup variable to true, and on mouseleave change the variable to false, but if the cursor is inside gui, and the gui get destroyed, the event isnt triggered, any other way to do it different to this? Im using if variable then variable = false end Before destroying the gui Link to comment
Moderators Patrick Posted March 20, 2019 Moderators Share Posted March 20, 2019 (edited) 17 minutes ago, said: I use it to check if localplayers cursor is inside gui, i add event to mouse enter, and setup variable to true, and on mouseleave change the variable to false, but if the cursor is inside gui, and the gui get destroyed, the event isnt triggered, any other way to do it different to this? Im using if variable then variable = false end Before destroying the gui Set variable to false before destroyElement is fine. Edited March 20, 2019 by stPatrick Link to comment
Moderators IIYAMA Posted March 20, 2019 Moderators Share Posted March 20, 2019 21 minutes ago, said: I use it to check if localplayers cursor is inside gui, i add event to mouse enter, and setup variable to true, and on mouseleave change the variable to false, but if the cursor is inside gui, and the gui get destroyed, the event isnt triggered, any other way to do it different to this? Im using if variable then variable = false end Before destroying the gui Instead of true save the gui element you entered. Then you can compare it to the destroyed element later. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now