I'm trying to make a very basic simulator and i'm not having any luck. I've followed 3 different tutorials and It's all the same error for me. " value is not a valid number of BoolValue "Players.MyUsername.leaderstats"
Here's my leaderstats script
local player = game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local strength = Instance.new("NumberValue")
strength.Name = "Treats"
strength.Parent = leaderstats
local cash = Instance.new("NumberValue")
cash.Name = "Bones"
cash.Parent = leaderstats
end)
The local script used inside the bone (tool)
local player = game.Players.LocalPlayer script.Parent.Activated:Connect(function() local leaderstats = player:WaitForChild("leaderstats") player.leaderstats.Strength.Value = player.leaderstats.value + 1
end)
I have another leaderstats script
local player = game.Players.LocalPlayer script.Parent.Activated:Connect(function() local leaderstats = player:WaitForChild("leaderstats") player.leaderstats.Strength.Value = player.leaderstats.value + 1
end)
The error pops up whenever i use my tool / click. I don't know what to do since i followed these scripts off of a tutorial but i've completely set the project aside until i can figure this out.
A picture of the error as well: https://i.imgur.com/1NBqhu9.png

3 comments
Leaderstats one btw
NumberValue exists - it allows decimals, such as 7.3
Oh my bad, I never seen one in my life