this is what I tried but did not work.
model:SetPrimaryPartCFrame(model.MainPart.CFrame * CFrame.Angles(0, -90 ,0))
this is what I tried but did not work.
model:SetPrimaryPartCFrame(model.MainPart.CFrame * CFrame.Angles(0, -90 ,0))
Make a new CFrame that uses the position of the part, and multiply the orientation to it.
local RotatedCFrame = CFrame.new(model.MainPart.Position) * CFrame.Angles(0, math.rad(-90), 0)
model:SetPrimaryPartCFrame(RotatedCFrame)
Hope this helps! :)
This discussion is preserved as it was. New answers, comments, and votes are closed.
7 comments
I think you meant CFrame.new(model.MainPart.Position) * CFrame.Angles(0, -90, 0) =P
Yep. Fixed. I'm messy today :p
did not work for me
make sure to use math.rad() inside the CFrame.Angles because it takes radians not degrees
never mind. I thought :p was part of the code
but the output says "Unable to cast Vector3 to CoordinateFrame"
Use the code I provided above, you are probably reading it incorrectly