I am trying to make an UI that appears when you trigger a ProximityPrompt and disappears once you click an imageButton.
However, once you make the UI disappear using the imageButton, you can no longer make it appear again using the ProximityPrompt, i’ve tried to put a print() to see if the prompt just didnt get triggered. But it outputs the print and doesnt change the UI being disabled.
Script inside the proximity prompt:
local part = script.Parent
part.Triggered:Connect(function(player)
local screengui = player.PlayerGui.ScreenGui
screengui.Enabled = true
end)
LocalScript inside the imageButton:
local imageButton = script.Parent
local screengui = script.Parent.Parent.Parent
imageButton.MouseButton1Click:Connect(function()
screengui.Enabled = false
end)