How would I rotate this part?

What I'm trying to do

I’m trying to figure out a way to have a cutscene showing the entire map of my game by spinning around 360 degrees in the center of the map. I believe this is the best way to do this, but I’m not sure.

So I was wondering how it would be possible to spin a part that is anchored. I thought there would just be a simple property in parts that says like “Rotation” or something like that, but the only thing I found was RotVelocity, which only works on unanchored parts. Can somebody explain how this would be possible?

There is a Vector3 property called orientation.

You could use Orientation:Lerp()

for example:

for i = 0,1,0.05 do
script.Parent.Orientation:Lerp(--orientation you want it to lerp to, i)

Lerping moves the part even if the part is anchored.

If you want the part to move around something and not just spin in place, you could add a CFrame:Lerp()

1 Like

It’s better to use TweenService IMO.

I guess, but I just use :Lerp(), it’s a habit.

I can’t seem to find where the DevHub explains how to use Orientation. It has an example, but doesn’t seem to use Orientation.

Maybe you can try tweening the camera to a upside down part then another part right side up.

local part = workspace.Part;
local TweenService = game:GetService("TweenService");
local properties = {Orientation = Vector3.New(0,0,0);}
local inf = TweenInfo.New(1)
local tween = TweenService:Create(part,inf,properties)

Orientation is a Vector3 property, very similar to Position, the only difference is it controls orientation, not the actual position. You can use it just like position, as it’s a property of the part, and it uses Vector3.