I'm trying to make a shop script and I get this error in the output: Workspace.OrangeParticle.ShopScript:10: attempt to index nil with 'leaderstats'.
OrangeBuyer.Touched:Connect(function(player)
local Player = player.Parent
local PlayerTouched = Players:FindFirstChild(Player)
print(PlayerTouched)
if PlayerTouched.leaderstats.Wins.Value >= 1 then
else
print("You do not have enough wins for this item.")
end
end)
Please give me the answer and a quick explanation for me to learn from my mistake.
