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!