Having a hard time making parts float and tilt with my Gerstner Waves

Hello I am developing a game and in that game there is an ocean and ships. I want to take the game to the next level so I decided to build custom Gerstner waves. Thankfully for me Gerstner waves are heavily documented and explained even outside of Roblox but I am having a lot of trouble getting parts to float on my waves.

I am trying to keep the waves on the client side for server performance and they do look good but now I am having trouble making the server understand where to float parts that I add. I have found a few methods in my research that people use. 1) Using getServerTimeNow() on both the client and the server and running the calculations on the server but I am struggling to figure out a way to locate which grid I am in to see which y value I should set it at. 2) Use a module script that both the client and the server look to find the y value which to me doesn’t seem safe or efficient.

Maybe there is something that I am missing I would appreciate any input or help that anyone can provide.

I don’t really know much about Gerstner waves but you might be able to use octrees to create an get the grid you are in or you could just use linerVelocitys to simulate buoyancy.

First off I really appreciate the help and I will look into octrees to see if that will be of any help sorting the grids and I think your right about using liner Velocity. Is it efficient to loop through all the bones in the Gerstner wave on the server even if im not changing anything? I’m not know how demanding that would be.

I believe it would have some sort of impact on the server’s performance so I suggest you only query bones on the client and in a radius of the player, again octrees will help you find object in a radius. Also if you want to simulate buoyancy you should take a look at this post: