Alternatively, you might need to only make 2 animation frames, although this would only apply if the robot sinks to the same depth in the lava. For instance, you can make a smaller invisible object maybe halfway down in the lava. Then set an event for when the robot overlaps with it to switch to frame 2 (the frame with half of the robot.) That way the robot would stay in its new form unless the frame is switched back to 1.