I cant get it to work
local PlrName = script.Parent.Parent.Parent.Owner.Value print(PlrName) local Plr = game.Players:FindFirstChild(PlrName) print(Plr) local CDP = Plr.leaderstats.CDP local amount = 3 CDP.Value = CDP.Value + amount
change line 5 to this (i guess):
local CDP = Plr:WaitForChild("leaderstats").CDP
before the player spawned, they need to insert the leaderstats inside.
So if you instantly check the leaderstats, they will get an error to you.