The script is supposed to put the pickaxe in the player's backpack when they touch the pickaxe giver. Unfortunately, when I testplay it, it gives this error at line 8:
Attempt to index nil with Backpack
The script:
local PickaxeGiver = script.Parent
local Pickaxe = game.ReplicatedStorage.GameItems:WaitForChild("Pickaxe")
local ClonedPick = game.ReplicatedStorage.GameItems.Pickaxe:Clone()
PickaxeGiver.Touched:Connect(function(hit, plr)
if hit.Parent:FindFirstChild("Humanoid") then
print("Check Works")
if Pickaxe.Parent ~= plr.Backpack then
print("Tool Check Works")
ClonedPick.Parent = plr.Backpack
print("Give Tool Works")
end
end
end)
I've looked at other posts to no avail. I've tried splitting the function into two separate functions and running it then. Tips would be appreciated since I'm relatively new scripter.

2 comments
should i help you in studio real quick? My roblox name is esepek.
It doesn't know what you are assigning for "Backpack" meaning you probably need to change plr.Backpack to something else