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