with this script i want Create that Noob is Model and if noob died then Respawn noob Give Xp and Cash and error is "plr(a nil value)"
local model = script.Parent
local backup = model:Clone()
plr = game.Players.LocalPlayer
Cash = plr:WaitForChild("stats").Cash
XP = plr.stats.XP
script.Parent.Humanoid.Died:connect(function()
wait(1)
model:remove()
Cash.Value = Cash.Value +30
XP.Value = XP.Value +10
model = backup:Clone()
wait(4)
model.Parent = game.Workspace
model:MakeJoints()
end)

1 comment
Using the word noob makes me not even want to help,but ugh.. Going to need more info like whether you're working with a local or normal script since it says plr is a nil value.