Shop Gui not disappearing

Ive been trying to make the shop gui disappear

game.Players.PlayerAdded:Connect(function(plr)
	
	script.Parent.Touched:Connect(function()
		plr.PlayerGui["Push Shop"].Enabled = true
	end)
	script.Parent.StoppedTouching:Connect(function()
		plr.PlayerGui["Push Shop"].Enabled = false
	end)
	
end)
1 Like

I suggest not closing the shop when you stop touching a part. You should have a button to open/close the shop from anywhere. However, if you really want it to only be available from a part on the map, you should use a big hitbox and use the Touched and TouchEnded events.

1 Like

I don’t think the event .StoppedTouching exists. I think you mean .TouchEnded ?

1 Like

How did you learn scripting? Your a really good scripter

1 Like

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