So, I’m making this door system, and I want it so that if you do not have a keycard equipped, the ProximityPrompts that are on the doors will not be visible. How would I do this?
Try connecting functions to .Equipped
and .Unequipped
events of your keycard.
If .Equipped
is triggered then make ProximityPrompts visible and make them invisible when .Unequipped
is fired.
Note: make ProximityPrompts invisible at start.
Have a nice day!
Just to add onto these replies here’s an example script.
local tool = script.Parent
local prompt = workspace.ProximityPrompt
tool.Equipped:Connect(function()
prompt.Enabled = true
end)
tool.Unequipped:Connect(function()
prompt.Disabled = true
end)