Unlike start
and tick
, functions that you create do not run automatically. We will need to tell the code when to run it, by calling the function.
The when is easy in this case, because it’s where the code used to run, over and over again in the tick
function.
- In the
tick
function, addthis.moveChest()

Testing: It Moves Again
Press play, and test that now your chest moves up the exact same way it did before.