Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can i make a proximityPrompt only visible when a certain player equips a tool?

I am making a game in which there would be locked doors so some of the time you will have to break the doors with a battering ram, i am planning on if someone equips the battering ram (a tool), the proximityPrompt will be visible for the localplayer (the player with the equipped tool).

May anyone help me ?

1 answer

There is a property in ProximityPrompt called Enabled. You can make the prompt visible and invisible. And simple use a local script to detect when the tool is equipped, to make it visible.

local tool = -- enter path to tool here
local proximityPrompt = -- enter path to proximity prompt here
proximityPrompt.Enabled = false

tool.Equipped:Connect(function()
	proximityPrompt.Enabled = true
end)

tool.Unequipped:Connect(function()
	proximityPrompt.Enabled = false
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.