Answered by
4 years ago Edited 4 years ago
You can do that by using this: SetPrimaryPartCFrame
https://developer.roblox.com/en-us/api-reference/function/Model/SetPrimaryPartCFrame
1 | model:SetPrimaryPartCFrame(cf) |
The CFrame property includes position and orientation, so you can use its orientation to rotate.
For exemple, a script that keeps rotating a model forever:
2 | local Position = model.PrimaryPart.Position |
3 | local Orientation = model.PrimaryPart.Orientation + Vector 3. new( 1 , 0 , 0 ) |
4 | model:SetPrimaryPartCFrame(CFrame.new(Position,Orientation) |
Closed as Not Constructive by WideSteal321, Necro_las, and raid6n
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?