Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to Rotate a model with a script?

Asked by 5 years ago
Edited 5 years ago

so i want to rotate a model with a script, precisely flip a car, does anyone know how to do this?

1
Try workspace.Part.Orientation secretboy6 68 — 5y
1
You'll also need to use workspace.Part.CFrame (Sorry for the vague suggestions. I'm in a hurry :P ) secretboy6 68 — 5y
1
If you're trying to move the whole model, make sure you set the model's PrimaryPart(a property of Model). Then from a script you can do [MODELNAME]:SetPrimaryPartCFrame(CFrame) jackfrost178 242 — 5y
View all comments (3 more)
0
Thanks for your suggestions guys but your telling me how to set a primary part, not how to rotate it SuperBeeperman 30 — 5y
0
SetPrimaryPartCFrame() moves the entire model, so if you wanted to rotate it you could maybe do something like: [MODEL]:SetPrimaryPartCFrame([MODEL].PrimaryPart.CFrame * CFrame.Angles(math.rad(90),0,0)) jackfrost178 242 — 5y
0
read more about SetPrimaryPartCFrame() here: https://wiki.roblox.com/index.php?title=API:Class/Model/SetPrimaryPartCFrame jackfrost178 242 — 5y

Answer this question