my script takes the hitbox rotation from the model but gives it 0,0,0 in all axes
for i, partsOnBase in pairs(plrfold:GetChildren()) do
if(partsOnBase:IsA('Part')) then
local tables = {PosX = partsOnBase.Position.X, PosY = partsOnBase.Position.Y, PosZ = partsOnBase.Position.Z, AnglX = partsOnBase.CFrame.Rotation.X, AnglY = partsOnBase.CFrame.Rotation.Y, AnglZ = partsOnBase.CFrame.Rotation.Z, PartType = partsOnBase.Name}
table.insert(BasePartsOwned, tables)
partsOnBase:Destroy()
elseif partsOnBase:IsA('Model') then
local tables = {PosX = partsOnBase.HitBox.Position.X, PosY = partsOnBase.HitBox.Position.Y, PosZ = partsOnBase.HitBox.Position.Z , AnglX = partsOnBase.HitBox.CFrame.Rotation.X, AnglY = partsOnBase.HitBox.CFrame.Rotation.Y, AnglZ = partsOnBase.HitBox.CFrame.Rotation.Z, PartType = partsOnBase.Name}
table.insert(BasePartsOwned, tables)
print(partsOnBase.Name)
print(tables)
partsOnBase:Destroy()
end
end
how i can fix that?