How to make things move on their own

i am trying to make something rise slow during a game , how do i do that (i am a new to coding)

Would you mind explaining a bit more. What exactly do you want? Do you want an animated cut scene? Or is it part of the game? Usually you move things by translating them or applying force to them.

It is part of a game , I made a huge square that has water material (transparent )and I have been trying to make it rise slowly

Well, there’s usually two ways people move things in Playcanvas. The first is translating and the other is applying force to a Rigidbody. I’ll show you the scripts with the two ways you can move the object.

  1. Translating
var TranslateExample = pc.createScript('translateExample');

/* TIPS:
    1. The Rigidbody Type can be Static, Kinematic, or Dynamic when attaching this script. Translating works independently from the Physics system. 
    Usually, it's best to Apply Force using the Physics System for a Player entity, so there won't be many bugs. 
    If the object just needs to rise quickly, like in your game, translating wouldn't be a bad option. 
*/

//This is an Attribute. It's basically a public variable. The default is 5, but you can edit it in the editor on the entity.
TranslateExample.attributes.add("objspeed", { type: 'number', default: 5, title: 'Object Speed' });

// initialize code called once per entity
TranslateExample.prototype.initialize = function() {
    
};

// update code called every frame
TranslateExample.prototype.update = function(dt) {
    //We directly add objspeed to the entity translate. We multiply by dt or deltaTime. If we don't, the object will just spawn in a new area.
    this.entity.translate(0, this.objspeed * dt, 0);    
};

// swap method called for script hot-reloading
// inherit your script state here
// TranslateExample.prototype.swap = function(old) { };

// to learn more about script anatomy, please read:
// http://developer.playcanvas.com/en/user-manual/scripting/
  1. Applying Force
var AppForceExample = pc.createScript('appForceExample');

/* TIPS:
    1. The Rigidbody must be type Dynamic or else this script won't work. When applying force, you use the Rigdbody component, 
    which does work with the Physics System, unlike translating. Gravity does affect this entity when the Rigidbody is Dynamic. 
    So you'll have to edit objspeed to be able to overcome the Gravity. The force will gradually increase when playing, 
    so you'll see the entity start out pretty slow, but will reach the value of objspeed, then stop there. This adds somewhat of a realistic feel, 
    which you won't feel when translating an entity normally.
*/

//Same as the last script. You can edit the default value in the editor.
AppForceExample.attributes.add("objspeed", { type: 'number', default: 300, title: 'Object Speed' });

// initialize code called once per entity
AppForceExample.prototype.initialize = function() {
    
};

// update code called every frame
AppForceExample.prototype.update = function(dt) {
    //We apply objspeed value of force in the Y part of the entity. We multiply by dt or deltaTime or else it won't work properly.
    this.entity.rigidbody.applyForce(0, this.objspeed * dt, 0);    
};

// swap method called for script hot-reloading
// inherit your script state here
// AppForceExample.prototype.swap = function(old) { };

// to learn more about script anatomy, please read:
// http://developer.playcanvas.com/en/user-manual/scripting/

Hope these scripts can help you. If you have any more questions about the scripts, or if something isn’t working, reply back and I’ll see if I can help