Sup, I try to save player Ids and their rank in a table that I cloned from a Template, but when trying to get the amount of PlayerIDs in a table it always returns 0
local FactionTemplate = {
Name ="placeholder",
Display ="Display Name",
Tag ="[000]",
Desc ="A very cool faction",
Banner ="rbxassetid://", --saves actual ID only
Icon ="rbxassetid://",
Owner =nil,
Members = {
--["1234567890"] = "Owner", Only how tis supposed to look like, actual scrit doesnt specify these
--["000000001"] = "Officer",
},
}
local Table =table.clone(FactionTemplate)
Table.Owner =Player.UserId
Table.Members[Table.Owner] = "Owner"
print(#Table.Members)
Looks like a dictionary, canβt grab the length of those with #
Make a custom counter (easy)
local function dictionaryCount(tableSent)
local counter = 0
for _, _, in tableSent do
counter += 1
end
return counter
end
dictionaryCount(Table.Members)
OR
turn the members into an array [1, 2] and then put the info in a table inside of the array number, so like [1] = {Name = β12313β} (meh, I think the custom counter is better)