Make Your UI Feel 10x Times Better With ANIMATIONS — Transcript
Full transcript
- 0:00How are you doing my fellows? It looks
- 0:03like you guys really enjoyed my latest
- 0:05videos [music] and since quite a few of
- 0:07you asked for a second part to the UI
- 0:09tutorial,
- 0:11here it is. Today, [music] I'm going to
- 0:13show you how to properly animate your UI
- 0:16elements so they stop looking static and
- 0:18start feeling more alive [music] and
- 0:20polished. Without further ado, let's get
- 0:23into it.
- 0:24When it comes to scaling and animating
- 0:26UI, one of [music] the biggest headaches
- 0:28is making everything modular. What this
- 0:30means is that when we change the size of
- 0:33our elements, we shouldn't [music] have
- 0:34to worry about their actual size, but
- 0:37rather their relative size. So, we're
- 0:40going to use a system [music] where it
- 0:41doesn't matter how many pixels an
- 0:43element is, but instead, we'll simply
- 0:45adjust its size using percentages.
- 0:49For example, when my [music] mouse
- 0:50hovers over a button, instead of making
- 0:53it 20 pixels bigger, we'll make it 15%
- 0:56bigger. This way, it will scale [music]
- 0:59consistently whether you're viewing it
- 1:00on a phone or a TV.
- 1:02This is what we're going [music] to be
- 1:03working with and there's not much code.
- 1:06We have a local script and a module
- 1:09script. Don't let the modules intimidate
- 1:11you. Just think of them as reusable code
- 1:14that we'll [music] use as a tool. The
- 1:16module script handles the UI logic,
- 1:19while the controller connects that logic
- 1:21to the elements we interact with. That's
- 1:23it. Now for the technical part. It's
- 1:26actually pretty simple. We have a table
- 1:28here that will store the [music] sizes
- 1:30of our UI elements. This way, we can
- 1:33access these sizes through this
- 1:35function. This stores [music] the size
- 1:37of every new element we add.
- 1:40The functions down here handle the
- 1:41buttons tweens using its base [music]
- 1:43size. The scale factor works as a
- 1:46multiplier. If it's one, [music] the
- 1:49size stays the same. If it's 1.15,
- 1:52the button becomes 15% bigger. And if
- 1:55it's [music] 0.5,
- 1:57it becomes half its original size.
- 2:01The last function [music] simply returns
- 2:03the button to its base state. As I
- 2:05mentioned earlier, the controller
- 2:07detects things like when we hover over a
- 2:09button,
- 2:10>> [music]
- 2:10>> so we can connect those interactions to
- 2:12our animations.
- 2:14As you [music] can see, it works
- 2:16perfectly.
- 2:19I'm going to add a click effect, [music]
- 2:20so you can see how it works.
- 2:23Inside the controller, [music] I'll use
- 2:25the mouse button one down event, which
- 2:27fires when we press the mouse button,
- 2:29regardless of when we release [music]
- 2:31it. Right here, I'll increase the button
- 2:34size slightly.
- 2:36Then, underneath, I'll use the opposite
- 2:38event, mouse button one up, which
- 2:41detects [music]
- 2:41when we release the mouse button. This
- 2:43lets us return the button to its
- 2:45original size. I'll make it use an
- 2:48elastic effect, because it looks really
- 2:50good.
- 2:51As you can [music] see, it works
- 2:53perfectly.
- 2:55Another really good trick for bringing
- 2:57your UI to life is creating [music]
- 2:59states. For example, I'm going to create
- 3:02another version of my buttons.
- 3:05These ones will be used [music] when the
- 3:07mouse hovers over them.
- 3:09Once we import them into Roblox Studio,
- 3:12we can add the new logic to the module
- 3:13[music] we already have.
- 3:16While making this video, I actually
- 3:18noticed that there's a new option called
- 3:20hover image, which literally changes the
- 3:22image when you hover over a button
- 3:24automatically.
- 3:25I'd recommend programming this yourself
- 3:27if [music] you have more complex plans.
- 3:29Otherwise, just use this new option.
- 3:32Thanks for listening. Back to the video.
- 3:34[music]
- 3:35Here, we're going to do pretty much the
- 3:37same thing as before. We'll create a
- 3:40table to store the images, [music]
- 3:41a function to register the different
- 3:43images for each button,
- 3:45and another function [music] to switch
- 3:47between states.
- 3:51I'm going to connect it to the hover
- 3:52event and with the release and leave
- 3:54[music] events.
- 3:56It's important to create a string value
- 3:59inside each button with [music] the ID
- 4:01of our image.
- 4:02If one of your buttons isn't going to
- 4:04have a hover version, just don't create
- 4:06one and it won't cause [music] any
- 4:08errors.
- 4:09Okay, I think it would be better if I
- 4:12remove the switch to the idle state on
- 4:14mouse release.
- 4:18Perfect. [music] Now this makes the UI
- 4:20feel much more interactive and polished.
- 4:24There are many ways to animate the
- 4:26opening of windows or panels, [music]
- 4:28but I'm going to show you one that I
- 4:29really like. This one right here, a fade
- 4:32slide.
- 4:34Now that we [music] are also modifying
- 4:35the position, I've modified the base
- 4:37sizes table so we can store the base
- 4:40position as [music] well.
- 4:42With the fade slide, we can specify its
- 4:45direction, whether it's in or out, along
- 4:47[music] with a small change in position.
- 4:51That way, every time the window opens,
- 4:54it slides into place and [music] fades
- 4:56in smoothly.
- 4:58To detect which button should open a
- 5:00panel, you can use attributes. For
- 5:03example, we can use a colors attribute
- 5:05[music] so the green button knows to
- 5:07open the shop.
- 5:10You can add attributes to any object
- 5:12down [music] here. Make sure that it's a
- 5:14string value.
- 5:16In the description, [music] you will
- 5:18find the complete script along with one
- 5:20more animation, a zoom [music] in and
- 5:22zoom out.
- 5:24One last thing before we finish. In the
- 5:27previous video, a lot of you had
- 5:29questions [music] about where to create
- 5:30your UI text. So let's clear that up.
- 5:34When should you create text in Figma and
- 5:36when should you create it in Roblox?
- 5:39There [music] are three main things you
- 5:40should consider. First, the type of
- 5:43text. [music]
- 5:44If the text is static and never changes,
- 5:47create it in Figma.
- 5:48>> [music]
- 5:49>> If it's dynamic, it depends. If the text
- 5:52is constantly changing, like a number
- 5:54that keeps increasing, or you need lots
- 5:56[music] of different variations, create
- 5:58it in Roblox.
- 6:00But if you only have a couple of
- 6:02possible [music] words for the same
- 6:03text, create them in Figma if it's
- 6:06practical. And if the text is
- 6:08interactive, just create it in Roblox.
- 6:11Second, [music] the size.
- 6:14If the text is going to be really,
- 6:15really large, create it in Roblox so you
- 6:18[music] don't lose quality when scaling
- 6:20it up.
- 6:21And finally, the design.
- 6:24If it's [music] something simple, like a
- 6:26Roblox font with a stroke, just make it
- 6:28in Studio. [music]
- 6:30But if it has a more complex design,
- 6:32like depth [music] or special effects,
- 6:35Figma is usually the better option. That
- 6:38said, if Studio already has the tools
- 6:40you need to recreate [music] the design,
- 6:42just make it in Roblox. And that's it.
- 6:46Thank you so much for all the support on
- 6:48my recent videos. [music]
- 6:50You guys are the best.
- 6:57>> [screaming]
About this transcript
This page contains the full transcript of Make Your UI Feel 10x Times Better With ANIMATIONS by Develuper, generated from the public captions YouTube serves with the video. The transcript has 1,137 words across 189 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.