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

Shop not opening when clicking the button?

So I was adding a shop to my game and I was making the button to open the shop.

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Visible = false
	game.StarterGui.Shop.MainShop.Visible = true
end)

Its a fairly simple script Line 1 and 2 where working fine, but on line 3 the shop wouldn't open.

Could someone please help me, thanks!

1 answer

✓ Accepted answer

To fix this, I would recommend putting the shop gui in the player who clicked it's gui specifically, like this:

	script.Parent.MouseButton1Click:Connect(function(player)
	    script.Parent.Visible = false
	   player.PlayerGui.Shop.MainShop.Visible = true
	end)

Happy scripting! :)

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