This gui closing script isnt working properly and I dont know why

If it is true it doesn’t run. And after you click it you set it to true - see the problem?

which script are you looking at

The last script you just sent. is it the first one instead

the second script works perfectly fine
its the first script that is having issues.

The first one isn’t working because you aren’t setting it back to true after you clicked it

cause we are trying to close it
not open it

So you don’t even need the open.Value check just everytime it’s clicked just set transpsrency and everything when it’s clicked.

Also how you are doing this is bad - you can just set the visibility and everything of the parent of all these uis to false unless you want other things in that openedInventory to be visible

  1. The problem is that the script doesn’t register the fact that you click the exit button the first time you open the inventory and try to close it. The open/close value doesn’t affect the closing or opening of the script besides being a safety check to make sure a script isn’t running unnecessarily. We have an identical closing script which works just fine. Main problem is that the script doesn’t detect being clicked.

we wanted to tween it not just make it invis

Just tween the parent of all of them no?

Are you sure script.Parent is the correct exit button you want to click - can I see the explorer

yes I am 100 percent certain that its the right one

image

I had one that was acting up like this on one of the first GUIs I made … ended up adding a sever script to the mix that just closed the GUI off the button. Not pretty but it still works well. Petty sure it was due to the ZIndex set on the button looking back.

3 Likes

First of all can’t you just tween the openedInventory instead of everything inside

Ill try that thank you for your help

That won’t work - that would change it for the whole server I’m pretty sure

Also why are you checking shopClose value on the 2nd script you showed us I can’t see a purpose

Try setting the zIndex to the top most image.