Hi. I am working on a character customizer and I need it to save and because I can't find an easier way, I decided to go with making a leaderstat value for each clothing and accessory. Now, the point saves and everything but the problem is that the script in which it checks if you have a point and if you do it gives you clothes, keeps coming out with an error. The script is in serverscriptservice. Code in the script:
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
print(player.Name .. " joined the game!")
local stats = player:findFirstChild("leaderstats")
local Lvl = stats.GirlClothes1
if stats ~= nil and Lvl.Value >= mlvl then
print("This player has the green dress!")
AddUniform(player)
end
end)
The error:
14:33:33.150 ServerScriptService.Main:60: attempt to index nil with 'GirlClothes1' - Server - Main:60
I don't understand the warning itself, which is probably why I am having trouble. Thank you!

2 comments
Hello, thank you for responding! Now the error doesn't show up anymore, thank you! Now I just have to figure out why the code isn't doing anything, lol.
glad i could somewhat help :)