Scripting with terrain

So i’m working on a flooding system and i wanted to make the water look more real, so terrain would be a great way of making it more real, but i don’t know if there is anyway of scripting with terrain, the water would start rising in a random event, didn’t try anything yet because didn’t find any way of scripting with terrain.

I would appreciate any advices of how to do it with terrain.

Maybe this helps.

You should try adding small layers of water with FillBlock() every few seconds, maybe that works, idk.

1 Like

Any idea how to unflood it? cause i made it work with a simple line of code now i need a idea to make it unflood.

I’m unsure how the built-in Roblox terrain system works or even how you script it, but you could try lerping/tweening.

Try using Air material (Enum.Material.Air).