I was modding a script from "Art of parkour" and I was trying to give the player AirCoins every time they wall jump, but the error says:
Players.(the player).Backpack.KeyBindings:34: attempt to index local 'plr' (a nil value)
and the script goes like this:
player.Character.InteractPart.Touched:connect(function(part)
if part.CanCollide == true then
wallJumpReady = true
mouse.KeyDown:connect(function(key)
key = key:lower()
if key:byte() == 32 and wallJumpReady == true then
local plr = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
plr.leaderstats["AirCoins"].Value = plr.leaderstats["AirCoins"].Value + 1
torso.Velocity = torso.CFrame.lookVector * 50 + Vector3.new(0,80,0)
wallJumpReady = false
end
end)
part.TouchEnded:connect(function(torsoPart)
if torsoPart == player.Character.InteractPart then
wallJumpReady = false
end
end)
end
end)
Please help!

3 comments
Where is this script located and what is interact part and where is that located?
Can you put the whole script in? We kinda only have up till line 19. Also I feel like your problem is that you are just not referencing the player properly, or this is not in a local script
Prestory, you dont get the script and greenhamster1, I don't want my script getting stolen.