The Orientation of This Model Keeps Defaulting to 0, 0, 0

In the script for this tycoon, when it creates a new tycoon it creates a new one from a model in ServerStorage, and the CFrame is set to -288.187, 79.828, 224.29, which is fine, but I need the orientation to be (in degrees) 0, 120, 90. I can’t figure out how I could change the orientation but here’s the line of code in question:
self.Model = newModel(template, CFrame.new(-288.187, 79.828, 224.29))
Help would be appreciated as I am relatively new to scripting.

CFrames use radians to rotate stuff, so you you would need some knowledge on that, however there is a math function that helps you convert between the two: math.rad() to convert Degrees to radians and math.deg() to convert Radians to Degrees.

to Rotate stuff using CFrames, you use CFrame.Angles, to apply both Position Orientation, you add them by multiplying them together.

by Default, if you apply just the Position, Orientation will be 0, 0, 0, if you only apply rotation, then the Position will be 0, 0, 0.

how would I do this? would it be like

self.Model = newModel(template, CFrame.new(-288.187, 79.828, 224.29) * CFrame.Angles(0, math.rad(120), math.rad(90)))
thanks for the extra info too

About so.

alright then thanks, guess i should’ve done more research huh

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.