Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I rotate a model?

I’ve literally tried every script and none of them work

2 answers

You can do that by using this: SetPrimaryPartCFrame

https://developer.roblox.com/en-us/api-reference/function/Model/SetPrimaryPartCFrame

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:

while wait() do
	local Position = model.PrimaryPart.Position
	local Orientation = model.PrimaryPart.Orientation + Vector3.new(1,0,0)
	model:SetPrimaryPartCFrame(CFrame.new(Position,Orientation)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.