So I am trying to make a boat but the problem is that I can’t figure out how to make it stay at the same y position but make it able to move around on the x and z axis. The reason why I don’t want it anchored is because I don’t know any physics constraints that can move an anchored object. If someone could help me that would be much appreciated. C:
✓ ANSWER ACCEPTED
How to prevent an object from not moving only on the y axis? (without anchoring)
1 answer
✓ Accepted answer
You could do this by using a Body Position. With a Body Position, you can set a target position which the Body Position will try to move its parent part towards, as well as the force it is able to pull with. Set the target position as 0, y-level, 0, and then set the MabForce to 0, math.huge, 0.
In a script, it would look like this:
local part = script.Parent
local bp = Instance.new("BodyPosition")
local yLevel = 3
bp.MaxForce = Vector3.new(0, math.huge, 0)
bp.Position = Vector3.new(0, yLevel, 0)
bp.Parent = part
1 comment
0
Thank you so much. C:
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Sup
Im bad at physics ;-; I'd recommend asking at dev forum or something there's so many pros there
You can try using a BodyPosition object, have its MaxForce set to (0, 100000000, 0), and the Position to (0, any number, 0).