I made a mistake, back in the early days of this small little game I type a 0 instead of a 1, that little typo made the progress/whole point of said game unplayable/ you cannot progress. I want to fix that, but I cant, because this script keeps throwing this error up:
leaderstats is not a valid member of Player “Players.Spiyder1”
Here is the script:
game.Players.PlayerAdded:Connect(function(player)
repeat
wait()
until player.leaderstats.Level.Value ~= nil
if player.leaderstats.Level.Value == 0 then
player.leaderstats.Level.Value = 1
end
end)
Error is on line:
if player.leaderstats.Level.Value == 0 then
How would I check if a player has this leaderstats value?