I'm trying to make a call of duty FPS type game and this is for the class but I'm not really good at tables and when I try this the output comes out as nil. Any help would be appreciated.
local class1 = {
Primary = "AN-94";
PrimaryAttachments = "Reflex Sight";
PrimaryAttachments2 = "Laser Sight";
PrimaryAttachments3 = "Quickdraw";
Secondary = "M1911";
equipment = "Frag Grenade";
tactical = "Tactical Insertion";
Perk1 = "Sleight of Hand";
Perk2 = "Lighweight";
Perk3 = "Dead Silence"
}
local class2 = {
Primary = "SCAR-L";
Secondary = "M1911";
equipment = "Frag Grenade";
tactical = "Tactical Insertion";
Perk1 = "Sleight of Hand";
Perk2 = "Lighweight";
Perk3 = "Dead Silence"
}
local activeclass = class1
print(class1[2])

6 comments
it still comes out as nil
Hello otaku if thats your name, do this: class1.PrimaryAttachments ---inside of print (;
Okay, try doing print(class1["Primary"]) It should work 99%.
xxcoordinatorxx, but if he's trying to get this data from another script, that wouldn't be the wise choice to go by.
still comes out as nil
But he isn't right now so yeah