I want to have gui that can be opened with proximity prompt and closed with gui with close button gui
The issue is its not working i tried almost every tutorial and i tried to edit scripts to open gui with click detector and still not working
Heres code what finally worked but after i pressed close button and used proximity prompt again its wont work. Im kinda new to scripting so if its bad scripted dont sue me.
Open script: not local script
script.Parent.ProximityPrompt.Triggered:Connect(function(player)
player:WaitForChild("PlayerGui").FridgeGui.Frame.Visible = true
end)
Close script inside gui: local script
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.Parent.Visible = false
end)
Note: sorry for my bad grammar