-
What do you want to achieve? a script that destroys the tool once the proximity prompt is triggered
-
What is the issue? its giving me an error saying that I’m attempting to index nil with ‘Destroy’
-
What solutions have you tried so far? none so far because I didn’t find anything similar to my problem
here’s the code so far, all help is appreciated
-- variables
local proximityPrompt = script.Parent.ProximityPrompt
-- code
proximityPrompt.Triggered:Connect(function(player)
player.Team = game:GetService("Teams").Acolyte
player.Backpack:FindFirstChild("Advancement Grimoire"):Destroy()
end)