Is it possible to tween terrain water upwards?

Hello! I’ve almost never used terrain before and I’m not sure how to go about using it with scripting. I want to achieve an effect of water rising up and increasing, ideally through a tween function, but I’m not sure how to go about doing this. I’ve found other posts similar in the past that said this was impossible to do and the trick was to tween the whole map down into water instead, but I feel my game would look better to see the water actually increase in size and rise up.

If the only way still is to lower the map into water, how do I do this if my map has a bunch of anchored and non anchored parts and other things connected to it? I’ve heard about tricks on tweening models but I’m not sure how to apply the solutions to this case and feel as if constantly setting the primary part CFrame would be very laggy.
Is there any way to easily have terrain water rising smoothly?

Thank you!

3 Likes

Hello @Astravast,

I do not know much about scripting/coding but I believe this may be impossible with the terrain that roblox build in studios. I am not that sure if that what I am saying is correct.

1 Like

I hope that’s not the case! I think there was a game that had something like this before (water rising) but I can’t remember what the game was.

Is the water you discussing about the Voxel Terrain water or a Part that is designed to look like water? I’m lost in which one it is.

Voxel Terrain water, I did use a part that looked like water before but it didn’t have the same effect I wanted in comparison to terrain water.

I don’t believe their is a way to tween Voxel terrain because it’s not something you can simply move like a Part. Given the explanation on Scripting Terrain I don’t believe it’s possible due to how Voxel terrain is handled.

1 Like

Ah ok, so my only alternative is to move my whole map down into created water instead?

I feel like that would be a really laggy alternative. I would personally just use a part as water, and tween the part up.

1 Like

I thought so too, but I really want to keep the aspects of terrain water that parts cant easily replicate (swimming through the water, camera effects under water, looks better to what an animated part can do etc)
I’ll probably investigate methods and see how bad it is for performance

A lot of games move the world downwards rather than moving the terrain water up. However if this is impractical, you could use timed Terrain:FillBlock() calls to give the water the appearance of it slowly rising up. Just note that Terrain operations can sometimes slow down the server or even bring it to a hault, so depending on your use case, only consider that option if you need a small area of water to begin rising.

Large terrain operations will also create a temporary ‘swiss cheese’ effect which isn’t ideal if you’re making any sort of large area of rising water.

2 Likes

I’m trying to avoid lag as much as possible as the server will have to do quite a lot, and the map is decently big too. I’ll definitely investigate if there’s a simple way I can just move my map downwards whilst maintaining good performance

You can use a regular part designed to look like water. For swimming, animations, and underwater effect, those can all be scripted. There’s a game called Dynamic Ship Simulator on Roblox, you can join and see that they use a regular part for water and they’ve scripted animations, swimming, and underwater effects.

I can confirm that you can script swimming and underwater effects because I’ve made a script before that does it.

1 Like

I’ve checked out the game, pretty cool!

The only thing I think is stopping me is 2 things:

  • I prefer the way terrain water looks like in comparison to a flat part with a material
  • I want objects in the water to have buoyancy

I know buoyancy is scriptable, along with swimming and underwater effects, but in previous attempts I failed horribly. It comes to a matter of whether it’s easier to descend my map into terrain water or to script all these things for a normal part to act almost the same as terrain water. I think I’ll try and descend my map, but if that turns out to be bad on performance I’ll probably use a part, thanks for this

2 Likes

Hello I just found this and thought of you. This may help. Terrain Editor | Documentation - Roblox Creator Hub

1 Like