Ok so i am doing to no a npc shop where i can buy items and food and this work perfectly
The thing is the gui won’t open more than once
Error:
Open GUI Script:
local Part = script.Parent
local ClickDetector = Part:WaitForChild("ProximityPrompt")
local fr1 = game.StarterGui.FoodGUI.Frame
ClickDetector.Triggered:connect(function(Player)
print("Test")
Player.PlayerGui.FoodGUI.Frame.Visible = true
end)
Close GUI Script:
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function(layer)
-- mpService:PromptProductPurchase(player,1183070939)
Player.PlayerGui.FoodGUI.Frame.Visible = false
end)
How can i fix this please?