i want to show an amout of points on a label, and for some reason i get this error
Players.Medoozi.PlayerGui.InsertedObjects.Gradient.TextLabel.LocalScript:8: attempt to index nil with 'points i've checked and i havent misstyped anything...
local Players = game:GetService("Players") local number = script.Parent local player = game.Players.LocalPlayer local leaderstats = Players:FindFirstChild("leaderstats") while true do wait() number.Text = "Cash:"..leaderstats.points.Value.."$" end
On Line 4, you are trying to find the child named "leaderstats" inside the Players service. This will most definitely return nil because the instance you're trying to find is not a child of Players. Instead of "Players:FindFirstChild("leaderstats")", you should do "player:FindFirstChild("leaderstats")".
Hope this works! if it works, mark it as an answer because it helps out everyone. If it didn't work, leave a comment and I'll try to find another solution.