How could this possibly happen?
I have a table of positions and when I removed one from that table, this error popped up.
It happens during this loop at CFrame.new(unpack(Pos))
for PieceName, Piece in pairs(GameData.House[CurrentHouseName].Furniture) do for _, Pos in pairs(Piece.Positions) do local Model = ReplicatedStorage.Housing.Furniture[PieceName]:Clone() local PieceCFrame = CFrame.new(unpack(Pos)) Model.Parent = workspace[GameData.House[CurrentHouseName].Name].Interior.Furniture for _, Part in pairs(Model:GetChildren()) do if Part.Name == "MainPart" or Part:IsA("BasePart") then Model.PrimaryPart = Part break end end Model:SetPrimaryPartCFrame(InteriorCFrame:toWorldSpace(PieceCFrame)) end end
This is the line where I am removing the position from the table.
table.remove(_G.GameData.House[HouseName].Furniture[Piece.Name].Positions[i])
Closed as Too Broad by Goulstem and TurboFusion
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?