Well i could give u a tutorial hjere as im bored rn.
So first lets understand something known as linear interpolation.this is simplified as lerp.this simply means to move a thing smoothly from one point to another.
Tweening is one of the way we move things.it was initially used to make GUIs move.then it expanded to everything. Now ik that lerping sounds like its hard but it isnt actually,Atleast on roblox. So let me explain you something know as
TweenService.
local TweenService = game:GetService("TweenService")
Ok? But what do i do withh it?
You can create a Tween.this basically stores movement info.
TweenService:Create()
First i want you to try it on a part. We will move it 10 studs on x axis.
So we fill the first parameter as Part
TweenService:Create(workspace.Part)
Next we will define something known as tweenInfo
This basically tells how long a tween has to be played and what way does it move throughout the tween.
local TweenInfo = TweenInfo.new(
1 --Duration of tween in seconds
,Enum.EasingStyle.Linear --Tells how will the tweens speed get adjusted throughout the tween.
,Enum.EasingDirection.InOut --Tells the direction in which easing style is applied.
,false --boolean for telling if it reverses to orignal state.
,0 --Tells how many times tween repeats.if set to negative,tween will repeat infinitely.
,0 --Delay in between repeatations in seconds.
)
TweenService:Create(workspace.Part,TweenInfo)
3rd param is a table.this describes what properties are to change.this is the format for table.
local TweenTable =
{
["Propeeties Exact Name"] = value
}
Now compile this together to this.
local TweenService = game:GetService("TweenService")
local Part = workspace.Part
local TweenInfo = TweenInfo.new(5)
local TweenTable = {["Position"] = Vector3.new(10,10,10)}
Tween = TweenService:Create(Part,TweenInfo,TweenTable)
Tween:Play()