So, I’ve got a body position to move my train here, the start and finish is marked with a black part. The problem I have, is when the train reaches the finish, it always goes past the goal, and springs back. I’ve tried increasing the force and it works to some degree, but that makes it go too fast for my liking. Anyone able to help?
local model = script.Parent.Parent
local platform = model.Main
local start = model.Start
local finish = model.Finish
local bodyPos = platform.BodyPosition
local timer = 20
while true do
bodyPos.position = start.Position
wait(timer)
bodyPos.position = finish.Position
wait(timer)
end
It’s like a BodyPosition, but instead of a part and a position it’s being pulled towards, there’s an Attachment that is pulled towards another Attachment.
Unless you need to customize MaxForce for each axis, AlignPosition is superior and you should use it.
If you increase dampening (BodyPosition.D), you can get rid of this effect, but it’ll slow down as it reaches its target. Alternatively, you could also use tweening if you don’t want to deal with body movers.