How can i make a ProximityPrompt show up 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 Like

You could simply store all of the proximityprompts for the doors into a table at the gamestartup, than once that tool is equipped make them visible for the localplayer by looping through them.

1 Like

Put this in a localscript in the tool.

local prompt = PromptPathHere -- set to the prompt path.

prompt.Stype = Enum.ProximityPromptStyle.Custom

script.Parent.Equipped:Connect(function()
     prompt.Style = Enum.ProximityPromptStyle.Default
end)

script.Parent.Unequipped:Connect(function()
     prompt.Style = Enum.ProximityPromptStyle.Custom
end)
3 Likes

Thank you so much for it, now it shows whenever i equip the tool.

1 Like