✓ Accepted answer
To do this, use TweenService.
local tweenService = game:GetService("TweenService")
From there, you give the created tween TweenInfo which takes parameters for the different properties the tween can have. These include time, easing styles, and the ability to reverse and repeat. TweenInfo also includes default values so if you only want to edit the time, use TweenInfo.new(n) and it will use the default values with your specified time.
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
n
)
local properties = {
Position = Vector3.new(x, y, z)
}
tweenService:Create(part, tweenInfo, properties):Play()
Use :Create() which takes the thing that is being tweened, the TweenInfo and the properties being changed as parameters. This can be made a variable and played multiple times.
References:
TweenInfo,
Create
2 comments
If you already know how to Tween something in a ScreenGUI, you're good to go. That would also work with Parts.
Oh! Thank you!