How to save two informations in a Table

Hello, guys! I’m doing a gang system and to save the gangs I’m using a table. But in my gang system have gang name and gang password so how to I (in a table) insert two informations? Like the gang name and the gang password. Furthermore, I need to save the table in a GlobalDataStore or just in a DataStore?

local GangHandler = {} local GangTable = {	DevGang = "123" } function AddGang(Name, Password)	if Name ~= nil and not Name:match("%s") then	table.insert(GangTable, Name)	end end return GangHandler 
1 Like

Try something like table.insert(GangTable, {Name, Password}).

2 Likes

Ok, im going to try it. Can this works too?

function AddGang(GangName, Password)	if GangName ~= nil and not GangName:match("%s") then	table.insert(GangTable, GangName)	if Password ~= nil and not GangName:match("%s") then	GangTable[GangName] = Password	end	end end 
1 Like

Yes, but not as efficient as my own, since mine requires less lines.

2 Likes