Working with tweens
Sometimes, we do not want to animate our own character or an NPC. Instead, we would rather animate something else, such as a gate. This could be the gates for a castle that open when you get close to it. It looks way better if these doors open by using some sort of animation rather than just being open instantly. Technically, we could use a hacky way of adding a Humanoid object into a model that contains the gate; then, we could play an animation on it. However, there is a better alternative. We can make Tweens.
In the following sections, we will create the previously described animated gate. We will start by making the gate ourselves and looking at Pivots. After that, we will start animating the gate.
Setting up the gate
Let us start by making the gate. In Figure 5.7, we can see a full gate with two doors. We will be making these doors ourselves:
Figure 5.7 – Gate
Follow these steps to make both doors:
- Create a new...