local module = {}
function module:Create(player: Player, profile)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local rolls = Instance.new("IntValue")
rolls.Name = "Rolls"
if type(profile.Data.Rolls) == "number" then
rolls.Value = profile.Data.Rolls
else
rolls.Value = 0 -- Set a default value if profile.Data.Rolls is not a number
end
rolls.Parent = leaderstats
end
return module
and i always get this error message: ServerScriptService.Modules.DataManager.Leaderstats:6: invalid argument #3 (Instance expected, got table)
And i cant find the issue. can anyone help?