How do I get the value of an attribute in this case?

local framework = {
	inventory = {
		"Primary" = character:SetAttribute("CurrentGun", "Ak47");
		"Fists"
	};
	
	module = nil;
	viewmodel = nil
}

print(framework.inventory[1])

So i want to have it so if I were to print “Primary” it will print the value of the attribute associated to “Primary” so if the value of attribute was ak47 and i went to print primary, like I did here

print(framework.inventory[1])

it will print Ak47
Screenshot 2024-07-09 155951

Please do not create duplicate posts. Refer to your other posts for answers.

maybe I do not have any answers on my other posts…?

UwU is right, dont duplicate posts.

you’re setting a String value as a variable, try to remove the " "

also, this is a very simple error and can be fixed by hovering the mouse to the text where it gives the error

dont copy paste code without knowing what you’re doing