Animations
Learn how to make animations with Enoria.
There is no official animations implementations in Enoria. However, every Enoria widget is a normal GUI Object (Frame
, TextLabel
, etc.). These can be animated with the TweenPosition
or TweenSize
functions. The simplest way to get a widget as a Roblox GUI object is to give it a name and to get it with the GetElementByName
function of the Context
object.
For instance, we have a menu with a play button that we want to hide (with slide animation):
At line 23 we give the menu Container a name. Then, at line 32, we can grab it by it's name and animated.
The last parameter of TweenPosition is a callback function. In this example, we set the state to make the menu not visible anymore. If we decided to put it after the tweening, it would not work since it would set the state before the animation has finished to play.
Last updated