Position is nil when loading table, but it isn't

Hi!

My CFrame value in a table is loading as nil, when it isn’t.

Table example:
image
As you can see, we have Position.

But, I have this error:
image
This is my CFrame code:

				realItem.CFrame = CFrame.new(table.unpack(item.Position)) * CFrame.Angles(table.unpack(item.Rotation))

Thanks for any help!

It seems it’s under another table inside of the item table, which I believe is the problem. Are you referencing the table as the [69] = {}? If so, use

realItem.CFrame = CFrame.new(table.unpack(item[2].Position)) * CFrame.Angles(table.unpack(item[2].Rotation))

image
Now I have this error.

Is there a variable called table or what did you replace it with?

I replaced it with his code. I dont have a variable called table.

I believe you took the code before I fixed it, because I had it as

realItem.CFrame = CFrame.new(table[2].unpack(item.Position)) * CFrame.Angles(table.unpack(item[2].Rotation))

and fixed it to

realItem.CFrame = CFrame.new(table.unpack(item[2].Position)) * CFrame.Angles(table.unpack(item[2].Rotation))
1 Like