Argument 2 missing or nil when setting a union's CFrame.Angles()

Hello everyone, currently i’m experiencing an issue with setting the orientation, via CFrame.Angles(), of a Union Operation of a part.

Line causing error:

Stage.StageLight.Base.CFrame = Stage.StageLight.Base.CFrame * CFrame.Angles(math.rad(-30),0,0)

Causes the Argument 2 missing or nil error, and I cannot determine what is the second argument.

I have also attempted:

Stage.StageLight.Base.CFrame = CFrame.new(Stage.StageLight.Base.Position) * CFrame.Angles(math.rad(-30),0,0)
Stage.StageLight.Base.CFrame * CFrame.Angles(math.rad(-30),0,0)

I cannot use .Orientation to set the orientation since it break the weld’s with the other parts in the model.

PS: I understand there are many topic already dealing with Argument 2 missing or nil, however none deal with a property like CFrame or properties in general.

Are you sure this is the line causing the error? I used this bit of code to test:

script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(70),0,0)

and it worked just fine in studio, and I’m not sure how it being a union operation could change that, since the CFrame property on both parts and unions are inherited from the BasePart abstract class.

1 Like

Yes I am sure that it is that is the line causing the error, i’ll post a screenshot for proof in case.

Also, if anything The union is in a model, inside another model.

Stage. --First Model, original
StageLight. --Second Model, encapsulating the Union
Base. --Union
CFrame --Property

Edit: Does having other functions in the script (that doesn’t deal with the stage lights at all) affect in this error such as tables and for i,v loops?

It shouldn’t. This error is really puzzling, and the only explanation I can think of is that it isn’t from this line of code.

1 Like

No seriously, the error is from this line (Clicking it from output and seeing the number next to the error line)
I have not attempted restarting studio, will see if that is related to the solution.

Yes restarting the studio was involved in the solution.

Sorry for taking your time in helping me in this dilema