Hello, I am trying to use model:SetPrimaryPartCFrame(spawn.CFrame) to teleport a players car to a race. The problem is this would rotate the model on the teleportation based on the models “front” face, but the problem is, what roblox thinks is the front face of the model is actually the side face of the car, so its teleporting sideways to the race. I dont want to check everytime what car it is to see if i need to do CFrame.Angles() or not, so is there any way I can change the “front” face that roblox decides, or is there another fix for this?
The only thing telling what direction is forward for an object is its orientation. If the orientation of the primary part is not what you want it to be, you need to fix it manually. There’s no way for a script to understand that the car is orientated incorrectly.
Another fix I use for this issue is to put an attachment in the primary part and rotate it by a certain orientation and let it represent the additional CFrame.fromOrientation that needs to be added to fix the offset.
You detect if the part has the correction factor it via find first child, and if it exists multiply the spawn CFrame with the attachment CFrame.
Alright thanks I will try this.