game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = plr
local val = Instance.new("IntValue")
val.Name = "Points"
val.Value = 0
val.Parent = leaderstats
local val = Instance.new("IntValue")
val.Name = "Wins"
val.Value = 0
val.Parent = leaderstats
end)
Why were you doing this leaderstats.Name("leaderstats"), .Name is a property that you need to set to a string value, string values are a group of characters and words inside of these " "
"this is a string"
"pizza 25"
"cool"
Doing leaderstats.Name("leaderstats") doesn't make any sense, well it does, if .Name was a function, and "leaderstats" will act up like a paramater to it, but not in your caset, Name is a property, this the way of setting properties.
leaderstats.Name = "leaderstats"
Remember that = (this is called an operator) is used to set properties, or variables to something, something.function()
and this format is always acting up like a function
5 comments
probably on accident im a beginner
its ok!
Sorry admin, i didn't provide any explanation cause really there is no explanation for this, but I usually always explain any answer I do
OP needs to mark this as answered, you went above and beyond.
thank you a lot man!