ProximityPrompt Not being disabled the second time!

Hello!

So me with my friend were making a game. It’s his game. Literal Baseplate (Map Revamp!!!) - Roblox

But when while I was scripting the barista, when closing the GUI and opening it the second time the ProximityPrompt was no longer being disabled!

Here are the scripts:

GUI Script (Normal Script In the ProximityPrompt)
local ProximityPrompt = script.Parent
local CafeGui = script.Parent.CafeGui

ProximityPrompt.Triggered:Connect(function(player)
	ProximityPrompt.Enabled = false
	local CafeGuiClone = CafeGui:Clone()
	CafeGuiClone.Parent = player.PlayerGui
end)
Close Script (LocalScript In the button)
local ProximityPrompt = game.Workspace.TrueBarista.ProximityPrompt
local CafeGui = script.Parent.Parent.Parent 

script.Parent.MouseButton1Click:Connect(function()
	ProximityPrompt.Enabled = true
	CafeGui:Destroy()
end)

Thanks! :slightly_smiling_face:

You’re changing .Enabled property to true on client after it’s disabled so it’s not overriding property because it’s already disabled on server

1 Like

Thanks! Have a nice day! :stuck_out_tongue: