I made a script of when you interact with a part through a proximityprompt a gui is activated, and there is a button that deactivates the gui, but for some reason when I interact with the part and close the gui I can't activate it anymore through interaction
Script inside part
script.Parent.ProximityPrompt.PromptButtonHoldEnded:Connect(function(plr)
plr.PlayerGui.ArmarioGui.Enabled = true
end)
LocalScript inside a textbutton
local Players = game:GetService('Players')
script.Parent.Activated:Connect(function()
local jogador = Players.LocalPlayer
jogador.PlayerGui.ArmarioGui.Enabled = false
end)

2 comments
Instead of PromptButtonHoldEnded you should add Triggered then connect it to a function.
Thank you