Hello, I am getting these random errors (The one in the title.), I have dug through it and tried to figure out my issue, but I just cant fix it, anyways here is the code, thanks!
-SupremeStarfish local plr = game.Players.LocalPlayer local reward = 25 local winreward = 1 local DisplayStatus = game.ReplicatedStorage:WaitForChild("Status") local leaderstats = plr.leaderstats << This is where the nil happened I already made a leaderstats inside the player in a different script.
script.Parent.Touched:Connect(function() DisplayStatus.Value = plr.Name.." has won!" leaderstats.Points.Value = leaderstats.Points.Value + reward leaderstats.Wins.Value = leaderstats.Wins.Value + winreward end)

5 comments
enter leaderstats into starterplayer
okay, do you have an example?
In the leaderstats variable, do plr:WaitForChild("leaderstats")
*Facepalm
Thank you everyone for participating! I now have the bug fixed, the main problem was i was using a regular script! AAGH! But anyways thank you all again for helping.