How do I make the lava go down when I press a button?

I am making a map called lakeside, and for this map, I am going to make the lava lower when I press a button. I need this map to be compatible with flood escape 2 main game, so I am looking for a way to do this similar to in beneath the ruins, magmatic mines, and sunken citadel.

3 Likes

use a buttonfunc, and make the water go down by setting the y value to a negative number
i don’t have the script rn

1 Like

here ya go
Lib.Script.moveWater(Lib.Map.Intro._Water1, Vector3.new(0, -30, 0), 10, true)
The -30 in (0, -30, 0) makes the liquid go down 30 studs.
To make this controlled by a button:
Lib.btnFuncs[1] = function()
Lib.Script.moveWater(Lib.Map.Intro._Water1, Vector3.new(0, -30, 0), 10, true)
end
You can change the button number in Lib.btnFuncs[1] simply by changing the number there.
You can also add as many lines of code between the top and bottom lines, this can be useful for moving doors or different liquids.

1 Like

Lib.btnFuncs[#] = function()
Lib.Script.moveWater(water, Vector3.new(x,- y, x), time, isLocalSpace)
end

I can only mark one of you as solution, but both extrememaster and voltzwinger helped.

1 Like

also plz visit my map i made called lakeside, https://forum.crazyblox.games/t/lakeside-wip. this is what i needed the lava going down for.

ooh i remember looking at that map
you might want to do something with lighting (very light fog and stuff)
(also voltz you wrote (x, -y, x) lmao)