Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why dose this error? Tables


BodyPackages ={
Combine = {["ModelName"]="" , ["Description"]="", ["Price"]=""},
HevSuit = {["ModelName"]="" , ["Description"]="", ["Price"]=""},
Everyday_Blue = {["Everyday_Blue "]="" , ["Description"]="", ["Price"]=""},	
}
print(BodyPackages [1]) -- It sould print table: (TableData) it just prints nil

1 answer

✓ Accepted answer

You don't need to assign the inner tables to variables; it should just be

BodyPackages ={
{["ModelName"]="" , ["Description"]="", ["Price"]=""},
{["ModelName"]="" , ["Description"]="", ["Price"]=""},
{["Everyday_Blue "]="" , ["Description"]="", ["Price"]=""},
}

If you want to have the original variables still usable do it like this

Combine = {["ModelName"]="" , ["Description"]="", ["Price"]=""} HevSuit = {["ModelName"]="" , ["Description"]="", ["Price"]=""} Everyday_Blue = {["Everyday_Blue "]="" , ["Description"]="", ["Price"]=""}

BodyPackages={Combine,HevSuit,Everyday_Blue}

2 comments

0

is there a way

0

A way to what? Still have the variables?

This discussion is preserved as it was. New answers, comments, and votes are closed.