Hi, im new to scripting and I need help with creating a detector script.
script:
script.Parent.ProximityPrompt.HoldDuration = 100
game.players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(Character)
if player.Backpack.FindFirstChild(“GlueRemover”) then
script.Parent.ProximityPrompt.HoldDuration = 1
else
script.Parent.ProximityPrompt.HoldDuration = 100
end
end)
end)
I am creating a script in a part with a proximity prompt that detects when a player has a certain tool in their backpack, and when they have that specified tool, the proximity prompt lowers its HoldDuration down to 1, which makes it faster. There are no errors in the code, but in game it does not work.