#``` if not event.element or not event

1 messages · Page 1 of 1 (latest)

round jay
#

I tested it and it still returns the error, funny thing is when I change the position of the two if clauses the other button crashes the game.

deep cape
#

well somehow it cannot find the element 🤔

#

is the element destroyed when clicked upon?

round jay
#

ahh, got it, if the first if clause is true the whole window is destroyed.
If the secound if clause then tries to access a child of the destroyed element.

Fixed it with:
local name = event.element.name

I wasted so much time on this,
Thanks for the help🥳

deep cape
#

No problem, sometimes a rubber duck is all you need.