After closing the shop gui, in which opens when you step on a certain part, it does not reopen, I will show you the code I did. Pop up shop:
function touch(hit) if game.Players:findFirstChild(hit.Parent.Name) ~= nil then player = game.Players[hit.Parent.Name] if player.PlayerGui:findFirstChild("Info") == nil then gui = script.Info:clone() gui.Parent = player.PlayerGui repeat wait() until (player.Character.Position - script.Parent.Position).magnitude > 0 end end end script.Parent.Touched:connect(touch) GuiNameHere.Enabled = true
Close/open: print("Close button loaded")
button = script.Parent window = button.Parent
function onClicked(GUI) window:remove() end script.Parent.MouseButton1Click:connect(onClicked)
you deleted the window. once you delete window, you'll have to point it to the shop gui again in order for it to work. instead of removing the window, you should set the window's visible/enabled property to false, and change the descendants inside of "window" instead of cloning the entire gui itself.
(p.s., when was playergui accessible from a serverscript :thonk:)