Flowing lava issues

I’ve made a script that’s supposed to make lava flow, but I’m not sure how to add it to the material.
Here’s the script.

var Lavaflow = pc.createScript('lavaflow');

// initialize code called once per entity
Lavaflow.prototype.initialize = function() {

// update code called every frame
Lavaflow.prototype.update = function(dt) {

Sounds like you want to start by using animated textures as shown here: https://developer.playcanvas.com/en/tutorials/animated-textures/

I did. This is that script.

The script that you have posted in the first post has no logic in it. Both the initialize and update functions are empty.

Must have accidentally deleted the original script. My bad.