2 lines in script not executing for some reason?

Alright, so, I am making an airport gate system, however when it comes to testing, there is an issue. The first time I sit on the seat, the UI appears all well as it should, however, if i get off the seat and back on, it doesnt, even though the print line after it executes. The line which is meant to set the jumpheight to 0 also doesnt execute on the second time, so it seems to me it is as if the script is just skipping over those 2 lines for some reason.

This is the main script that should be doing this

This is a local script which makes the ui disappear when the close button is pressed on the ui

This is a video to visualise the issue

I hope ive explained it well enough, thanks in advance

This is because you’re enabling the GUI on the server and closing on the client. It seems to not update the variable as it’s already set to true according to the server. A simple fix is to just use a remote event.

Thank you, i dont know how i didnt think of this, I havent scripted in a while and its showing haha

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