An open-source tweening module for Roblox, featuring advanced
datatypes, accurate color interpolation and more customization.
More capabilities!
With all the features of TweenService,
and many new and amazing features:
- Attributes support.
- Advanced properties:
-
Pivot
. -
Scale
. - Sequences.
- Ranges.
- Strings.
-
- Reset tween method.
- Framerate limit control.
- Additional tween signals.
- Update event customization.
- Intuitive custom TweenInfo table.
- Accurate color interpolation (Oklab).
With all easing styles that TweenService provides,
and an additional OutIn
easing direction for all styles.
Check it out below!
🎬 Showcases
Text tween
A super simple text tween — although not supported at all with TweenService.
Tween+ handles strings cleverly, finding similarities and differences, then interpolating accordingly.
Low FPS
A super simple part movement tween with the FPS
set to 10
.
The game still runs smoothly (in this case 144 FPS).
Accurate color
A super simple part color tween.
Since Tween+ handles colors using Oklab interpolation, we get a smooth blend unlike any other.
OutIn
easing direction
A super simple part movement tween with a rather interesting, exclusive easing direction.
Efficient, robust, intuitive.
- Blazingly fast speeds.
- Clear error feedback.
- Typing & documentation.
Get started!
💡 Tutorial
Getting the module
Let’s first get the module. There are two ways:
-
Get it from the creator store:
- Click
Get
at the top of this post. - Click
Get Model
on the store. - Open the ToolBox in Roblox Studio.
- Go to the
Inventory
tab. - Click on
Tween+
.
- Click
-
Get it from GitHub:
- Click
Git
at the top of this post. - Go to
Releases
. - Download the latest
.rbxm
file. - Find the file in your file explorer.
- Drag the file into Roblox Studio.
- Click
Find a great place for the module in your explorer.
Basics
In any script, simply require the module. It will return a tween creation function. Example:
local tweenPlus = require(script.TweenPlus)
local tween = tweenPlus(
workspace.Part, -- Instance to tween.
{} -- Properties to tween.
)
You simply input all the properties you would like to tween.
local tween = tweenPlus(
workspace.Part,
{
Position = Vector3.new(0, 10, 0),
Color = Color3.fromRGB(255, 255, 0)
-- And as many more as you'd like.
}
)
Full list of supported data types:
- boolean
- number
- string
- Vector2
- Vector3
- UDim
- UDim2
- Color3
- CFrame
- NumberRange
- NumberSequence
- ColorSequence
Attributes
Starting a value name off with a @
will let Tween+ know that it’s an attribute.
Other than that they work the same as usual properties.
For example:
local tween = tweenPlus(
workspace.Part,
{
Position = Vector3.new(0, 10, 0),
Color = Color3.fromRGB(255, 255, 0),
["@Coolness"] = 10 -- Attribute named 'Coolness'.
}
)
Customization (TweenInfo)
The customization works with a table, where you can provide any customizations you want.
You don’t have to provide all, or even any, because they all have defaults.
You use it like this:
local tween = tweenPlus(
workspace.Part,
{
Position = Vector3.new(0, 10, 0),
Color = Color3.fromRGB(255, 255, 0)
},
{ -- Customization (optional).
Time = 10,
EasingStyle = "Sine",
EasingDirection = "InOut"
}
)
Full list of customization options:
-
Time: number
- EasingStyle: “Linear” | “Quad” | “Cubic” | “Quart” | “Quint” | “Sine” | “Exponential” | “Circular” | “Elastic” | “Back” | “Bounce”
-
EasingDirection: “In” | “Out” | “InOut” | “OutIn”
- RepeatCount: number
- Reverses: boolean
-
DelayTime: number
-
FPS: number
- UpdateEvent: “PostSimulation” | “PreSimulation” | “PreRender”
Playback and control
When creating a new tween, you can then use the following methods:
-
Start
Starts or resumes playback of the tween. -
Stop
Stops playback of the tween.
Can be resumed withStart()
. -
Reset
Stops playback of the tween, and resets to starting values. -
Destroy
Makes the tween unusable, and ensures it’s stopped.
For example:
local tween = tweenPlus(workspace.Part, {Transparency = 1})
tween:Start()
Signals
When creating a new tween, you can listen to the following signals:
-
Updated
Fires every iteration of a tween playback; every time values are updated for the instance.
It provides the current alpha (linear) at every update.
alpha
is the progress from a to b — so with reversing and repeats it will go back and forth. -
Started
Fires when the tween playback is started or resumed. -
Stopped
Fires when the tween playback is stopped. -
Completed
Fires when the tween playback finishes.
For example:
local tween = tweenPlus(workspace.Part, {Transparency = 1})
tween.Updated:Connect(function(alpha)
print("Progress: "..tostring(alpha*100).."%") -- For example "Progress: 50%".
end)
tween:Start()
Don’t forget to stay up-to-date!
It’s highly recommended to have the latest version at all times. This ensures:
- Newest features.
- Best performance.
- Little to no bugs.
You can view all releases (versions) and what they contain at the GitHub repository.
Major updates will be posted here, in the replies section, too.
Use this post as documentation for the module.
All documentation will stay up-to-date in this post.
Share your thoughts and creations!
I’d love to see what you guys are able to do with this, so consider sharing your works!
But most importantly:
- Report any bugs or mistakes you find for this asset and post!
- Consider providing feedback to help me and the asset improve!
Like what you're seeing?
Check out more from me!
∙ Text+|Custom fonts & advanced control∙ Signal+|Insanely optimized script signal
Tags
module animation tween tweenservice attributes support advanced properties fps framerate limit control accurate color interpolation oklab open source quality performance optimization