DarkPixlz
(darkpixlz)
#1
Hi!
My CFrame value in a table is loading as nil, when it isn’t.
Table example:

As you can see, we have Position.
But, I have this error:

This is my CFrame code:
realItem.CFrame = CFrame.new(table.unpack(item.Position)) * CFrame.Angles(table.unpack(item.Rotation))
Thanks for any help!
Kaid3n22
(Kaiden)
#2
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))
SOTR654
(SOTR654)
#4
Is there a variable called table
or what did you replace it with?
DarkPixlz
(darkpixlz)
#5
I replaced it with his code. I dont have a variable called table.
Kaid3n22
(Kaiden)
#6
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