Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My shop gui does not reappear after I press close, is there a solution?

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)

4 comments

0

crys of laughter

0

i mean the toolbox is a start

0

im not a great scripter but somewere it says ~=? i dont know if thats causing an error

0

It does not work

1 answer

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:)

1 comment

0

this is not possible to do

This discussion is preserved as it was. New answers, comments, and votes are closed.