InitScript

Bring a scene to life when you press Play: move things every frame, make new instances, or drive a whole video from code.

An InitScript runs in Play mode (F5) and in renders, never in Edit. Connect to Root.Heartbeat to run every frame; Stop disconnects everything and puts back what it changed. Directly under a CookVideo it may return function(time): the video calls it once per frame with its time, in Play, renders and exports, so it must depend on time alone, and it draws the video's picture layers itself.

From ModuleScript 1
From LuaSourceContainer 1
From Instance 22