Hi Developers, Today I have a Question, how and where can I set the ProximityPrompt to activate when a specific tool is equipped?
(The ProximityPrompt is script.Parent)
local db = true
local Robo1 = script.Parent.Parent.Parent.Robo1:GetChildren("RB1")
script.Parent.Triggered:Connect(function(plr)
if db == true then
db = false
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 250
Robo1.Transparency = 1
script.Parent.Parent.Parent.Sonido.S.Playing = true
wait(5)
Robo1.Transparency = 0
db = true
else
if plr.PlayerGui:FindFirstChild("NoMoneyPrompt") then
plr.PlayerGui:FindFirstChild("NoMoneyPrompt"):Destroy()
local errorprompt = game.ReplicatedStorage.RobberyGUI.NoMoneyPrompt:Clone()
errorprompt.Parent = plr.PlayerGui
wait(1)
errorprompt:Destroy()
else
local errorprompt = game.ReplicatedStorage.RobberyGUI.NoMoneyPrompt:Clone()
errorprompt.Parent = plr.PlayerGui
wait(1)
errorprompt:Destroy()
end
end
end)
Thanks!

1 comment
You can use :FindFirstChild("ToolName") to check if player equip the tool!