Twinkle - Free, powerful UI animator module

Twinkle 0.9.5

| Get it on GitHub! |

Typewriter

Twinkle UI animator module is a lightweight, open-source UI animation module for Roblox developers. Designed to eliminate boilerplate tween code, UIAnimator gives you a clean, expressive API to animate frames, buttons, and text with minimal setup.

No hardcoded blur instances, no manual TweenService chains, no copy-pasting hover logic across every button. UIAnimator handles it all automatically through a tag and attribute system built directly into Studio.

Beauty of this module is that it comes loaded with some basic frame and button animations along with complicated text effects that would have otherwise taken hours of useful time.


(Note: Features and Hierarchy are continously being updated to make installation and customizibility easier so the actual hierarchy or UI may differ upon first installation compared to the one from the images)


:information_source: Features & Examples

(:warning: Note: There maybe one or more dropdowns within the dropdown which explains how to set up the feature. Please read it to avoid confusion early on)

Custom text effects!

Expand to view full feature
:warning: Contains a ‘How-to’ dropdown at the end. Make sure to open to see how to implement this
  • Typewriter:
    Typewriter

  • Shootout:
    Shootout

  • Jittery:
    Jittery

  • Plop In:
    PlopIn

  • Glitch:
    Glitch

  • Fade In:
    Fade

Here's how to set it up
  1. Make sure the TextLabel which you are going to animate is within a frame

  2. Write this code:

local Container: Frame = path.to.your.containerFrame
local Label: TextLabel = Container:WaitForChild("Label")

UIAnimator.ShowText(Container, Label, nil, {
	effect = "Glitch",
})
  1. The reason we are using a container and then a text label inside is because the UIAnimator module has to create a lot of duplicate texts to render each word letter-by-letter. And that list will grow the more letters you have in that sentence.

Custom button hover!

Expand to view full feature
:warning: Contains a ‘How-to’ dropdown at the end. Make sure to open to see how to implement this

BounceHover
LiftHover
GrowHover
TiltHover

Here's how to set it up
  1. Give your ImageButton or TextButton the tag “Animatable”
    image

  2. Adding the Attributes to it are completely optional. It defaults to “Grow” for HoverType and “Shrink” for PressType

Custom button press!

Expand to view full feature
:warning: Contains a ‘How-to’ dropdown at the end. Make sure to open to see how to implement this

ShrinkPress
PunchPress

Here's how to set it up
  1. Give your ImageButton or TextButton the tag “Animatable”
    image

  2. Adding the Attributes to it are completely optional. It defaults to “Grow” for HoverType and “Shrink” for PressType

Cursor ripple effect!

Expand to view full feature
:warning: Contains a ‘How-to’ dropdown at the end. Make sure to open to see how to implement this

RippledEffect

Here's how to set it up
  1. Click on the UIAnimator module script
    image

  2. Have the RippledEnabled attribute set to true

Sequence (advanced tutorial)

Expand to view full feature

The .Sequence() function is one of the powerful advanced function to help you queue (or sequence) any public functions without having to manually do task.wait() between each line of code.

This function is especially very helpful for NPC dialogue system.

function UIAnimator.Sequence(steps: {{[string]: any}}, options: {
    }?)
end

Here are some ways in which you can use the sequencer to queue things for you:

First method:

-- Basic sequence, yields the calling thread until done
UIAnimator.Sequence({
	{fn = UIAnimator.FrameZoom,  args = {frame, true, 0.4}},
	{wait = 0.5}, -- Waits 0.5s before running the next animation
	{fn = UIAnimator.FrameSlide, args = {panel, true, 0.3}},
	{fn = UIAnimator.ShowText,   args = {container, label, "Hello!"}},
})

Second method:

-- Two steps running alongside each other
UIAnimator.Sequence({
	{fn = UIAnimator.FrameZoom,   args = {frame, true, 0.4}},
	{parallel = true}, -- Runs 'FrameZoom' and 'FrameBounce' at the same time
	{fn = UIAnimator.FrameBounce, args = {otherFrame}},
})

Third method:

-- Non-blocking, caller continues immediately
UIAnimator.Sequence({
    {fn = UIAnimator.FrameZoom,  args = {frame, true, 0.4}},
    {wait = 1},
    {fn = UIAnimator.Fade,       args = {frame, false}},
}, {
    parallel = true, -- By adding this, you can essentially run 2 UIAnimator.Sequence() calls in parallel
    onComplete = function()
        print("sequence finished")
    end
})

Other misc. features

Expand to view feature

This UIAnimator module comes packed with a lot of functions and utilities and if I list them all here, it will take me another, ummm lets see, 5 hours or so (give or take). No thanks :')

Still, I would like to showcase the function headers here so you know they exist. How to use which function is very neatly defined in the comments above the function name inside the UIAnimator module so please do open it up and look at the comments.

You will also be shown the tooltips when you are calling the functions from another script. Anyways, here are some headers:

function UIAnimator.FadeSlideRunoff(element: GuiObject, speed: number?, blurEnabled: boolean?, hideOtherUi: boolean?, runOffAtEnd: number?, customStartPosition: UDim2?, customEndPosition: UDim2?, customTweenInfo: TweenInfo?)
function UIAnimator.FrameSlide(element: GuiObject, show: boolean, speed: number?, fadeIn: boolean?, blurEnabled: boolean?, hideOtherUi: boolean?, resetOgPos: boolean?, customStartPosition: UDim2?, customEndPosition: UDim2?, customTweenInfo: TweenInfo?)
function UIAnimator.FrameZoom(element: GuiObject, show: boolean, speed: number?, blurEnabled: boolean?, hideOtherUi: boolean?, startSize: UDim2?, customEndPosition: UDim2?)
function UIAnimator.Fade(element: GuiObject, show: boolean, speed: number?, blurEnabled: boolean?, hideOtherUi: boolean?, customTweenInfo: TweenInfo?)
function UIAnimator.FrameBounce(element: GuiObject, speed: number?, bouncePercent: number?)
function UIAnimator.ShowText(container: Frame, label: TextLabel, text: string?, options: ShowTextOptions?)
function UIAnimator.SetCameraProps(props: CameraProps?)
function UIAnimator.SetBlurSize(size: number?)
function UIAnimator.SetButtonStyle(element: GuiObject, options: {
	hoverType: ("Lift" | "Bounce" | "Grow")?,
	pressType: ("Shrink" | "Punch")?,
	scalePercent: number?
	})

:information_source: How to implement

  • Drag and drop UIAnimator into Replicated Storage
  • Drag and drop “Packages” folder into Replicated Storage
  • You are good to go! :confetti_ball::tada:

:information_source: Updates

  • [0.9.5] - Base version

:information_source: Downloads

Get it on GitHub!

Archives

v0.9.5 Twinkle (UIAnimator) by leoprad2006.rbxm (37.3 KB)


:information_source: Footnotes

51 Likes

Looks good but I can’t access the github link. Did you put a link into the hyperlink?

1 Like

Hi sorry I am still in process of making this full DevForum :sweat_smile: I will ping you once I am done making this completely :')

2 Likes

It looks interesting tbh, but there are so many tools on Roblox that it is going to get to a point where it is all the same, but it’s just who can make it nicer and more appealing.

1 Like

Really not sure what you mean by that. I haven’t found a single tool (or any other community resource) that let’s me create what I am doing within 2-4 minutes.

The reason I am uploading this resource is to save the developers hours worth of their time setting animations for their frames, buttons, and texts. This is to help avoid setting up everything from scratch over again.

This also makes sure there are no memory leaks and hit to performance.

Had me with the first five letters.

In all seriousness, this looks great! Definitely something I will be using. And what Taylor said, please get around adding the github link :sweat_smile:

1 Like

The download link is here! :partying_face: Please get it from the post’s GitHub link!
@TaylorDev_RBLX
@pigpen255

2 Likes

I’ve been needing this :folded_hands:

Much appreciated goat

1 Like

I feel like I am missing a key piece to why I cannot get this working. I have tried within my own game and a blank baseplate. No luck.

I am specifically going after the button press setup with an ImageButton. I have added the module and packages folder to replicated storage and followed the setup with tags and attributes. What else am I missing?

I haven’t taken a look but are you loading the module?

No I am not. Did I miss that in the instructions?

Sorry that was not in the instructions. Yes, please require(UIAnimator) somewhere in your game structure.

2 Likes

All good! Looks to be working now. I thought it felt odd without a require, but wanted to trust the instructions. Appreciate the resource creation.

1 Like

Glad you got it working. Helped me point out an area of improvement.

Next version will come up with a LocalScript attached just beneath the module. The script containing just one line of code to require the module so the tags work.

2 Likes

I mean, there are so many tools or API’s, for example, in the real programming world, everything has been made, so we will most likely get to a point where there are just double-ups of things, but yea tool seems awesome imo.

1 Like

Thank you.

Yeah eventually maybe. But at this time and age, nobody has made what I made for free (at least to my knowledge)

Quick note, have you considered using something like gitbook.io to make a technical documentation to help make it easy to understand the endpoints, functionalities’ and parameters?

Yes, I have considered. I know it will take a lot of time so I was kind of procrastinating about it. Currently, I am developing a dungeon-crawler (+ some aspects of RPG) game so I am quite busy with that. Not to mention I am a University student so quite busy with studies too :sweat_smile:

Initially, this was UIAnimator was used solely in my games but I thought this was something that was much needed by me in the past but I never found something like this so I ended up making it fully and thought I’ll make it free for everyone. I believe it will help a lot of the new scripters who are just starting out (as well as the experienced).

3 Likes

This module was super useful for text related things. Thank you for publishing this resource :slight_smile:

1 Like

Why is there no source on Github? It makes pull requests and forks impossible