local proximity = script.Parent
local tool = game.Workspace.thing
local function giveTool(player, tool)
local backpack = player:FindFirstChildOfClass("Backpack")
if backpack then
tool.Parent = backpack
end
end
script.Parent.Triggered:Connect(function(player)
giveTool()
end)
my error
19:19:00.608 Workspace.pedstall.part2.ProximityPrompt.Script:5: attempt to index nil with 'FindFirstChildOfClass' - Server - Script:5
How do i fix this?
btw this is my explorer if you need: https://ibb.co/Zm9Wfws

1 comment
Line 13 you forgot to pass the player and tool to the function.