I want the player to be able to open a store frame using ProximityPrompt. The frame and GUI is located inside StarterGUI and I’m making it so that it opens locally for the player only.
The issue is that after it is opened and closed ONCE, it breaks and it doesn’t open anymore, even though it prints out that it has-
Code
Script inside ProximityPrompt inside part
script.Parent.Triggered:Connect(function(Player)
Player.PlayerGui.Store.ScrollingFrame.Visible = true
print(Player.DisplayName.." opened store menu!")
end)
Code inside close button of frame
local Player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
Player.PlayerGui.Store.ScrollingFrame.Visible = false
end)
Is there an error in my script because I have never had this problem-?