# How to make a smooth Rotation/Orientation part?

Hello,
I just made a script that makes a part move very smoothly with a BodyPosition. but I am trying to do the same smoothly with rotation/orientation.
The problem is that, the Part orient very fast, and I don’t want that.
can someone help me?

–Video demonstration
https://streamable.com/edoj5q

–The code

2 Likes

You can either use the TweenService or you could use a AngularVelocity.

which one do you think its better ?
Edit: I am going to try with TweenService

Just use tweenservice

``````local info = Tweeninfo.new(URTIMEHERE)
local properties = {
Rotation = Vector3.new(0,0,YOURANGLEHERE)
}
local tween = game:GetService("TweenService"):Create(part,info,properties)
tween:Play()
``````
3 Likes

and if I want to make that the part move to more than one Position.
how I must do it?

You would just add another property onto the 3rd argument.

``````local info = Tweeninfo.new(URTIMEHERE)
local properties = {
Position = Vector3.new(x,y,z)--YOURPOSITIONHERE
Rotation = Vector3.new(0,0,YOURANGLEHERE)
}
local tween = game:GetService("TweenService"):Create(part,info,properties)
tween:Play()
``````

I’ve reformatted the script to make it easier to read.

you mean for multiple positions I must do:

local properties = {
FIRST POSITION Position = Vector3.new(x,y,z)–YOURPOSITIONHERE)
SECOND POSITION Position = Vector3.new(x,y,z)–YOURPOSITIONHERE)
Rotation = Vector3.new(0,0,YOURANGLEHERE)
}

No, you would have to make a new tween, so you would have to copy and paste that for every new position.

1 Like

something like:
local properties1 = {
Position = Vector3.new(x,y,z)
}
local properties2 = {
Position = Vector3.new(x,y,z)
}
local tween1 = game:GetService(“TweenService”):Create(part,info,properties1)
local tween2 game:GetService(“TweenService”):Create(part,info,properties2)
tween1:Play()
tween2:Play()

2 Likes

Yeah that’s perfect, you don’t need to change the info or the part though. Just keep that in mind.

2 Likes