How would I go about making a model stay at the same height while being able to move around

Hello, so I have a game that will require the ability to have a ship be driven by the player. The water is not done using the terrain so it makes it more difficult to make it stay there.

How would I go about ensuring that the model remains at the same height while being able to move it?

Use a body position object that only applies force on the Y axis. The Y value you set it to would be the Y value of the water, make sure the max force of X and Z are both 0.

1 Like

image
I have the values set as such, but it doesn’t seem to have an effect

Did you script it at all? If so show the code, the mover won’t do too much on its own.

I got this, dont know if it is correct though. I don’t work with the body things ever

while true do
	script.Parent.MaxForce = Vector3.new(0,9999999,0)
	script.Parent.Position = Vector3.new(0,227.099, 0)
	wait()
end

Make sure the part is unanchored

It is a model, but yes, they are all unanchored. It is in the air when I run the game, and everything falls

You might have to weld everything together and then set a PrimaryPart property for the model. Then set the body position in the primarypart.

Try setting the MaxForce higher:
part.AssemblyMass * workspace.Gravity * 2

This should make sure it is enough. Play around with the “D” and “P” values.

No need to use a while loop if you are setting the same position.

Everything is already welded, and and bodyposition is indeed in the primary part

Turns out their was one part that was anchored still, but for some reason dind’t prevent freefall!