Regular script in workspace.
local human = script.Parent.Humanoid
human.Died:Connect(function(player)
player.leaderstats.Experience.Value = player.leaderstats.Experience.Value + 5
end)
Basically, if the player kills the enemy, the value "experience" should increase by 5, but it doesn't, instead it gives me this " 16:53:46.035 - Workspace.Model.Zombie.EXPGiver:3: attempt to index local 'player' (a nil value)". Anyone could tell me what causes this error message and how to make this script work?

2 comments
you wrote player. You didnt define "player"
no