BodyPosition speed scales by distance?

Hello developers. So I’ve recently been testing around Roblox physics and came across BodyPositions. I was using them and realized that their speed scales by how far the target position is. I have a video as reference to show


As you see in the video, when the distance is longer, the speed is higher and so on.
Here is the code

while task.wait() do
	script.Parent.BodyPosition.Position = script.Parent.Parent.outer.Position
end

So what I’m thinking is, how can I stablize the speed? I’ve messed around the dampening and power but it doesn’t seem to be working.

Any help appreciated!

What is your use case? You can use BodyVelocity for this as well.

Sorry for late reply.
I’m trying to make a pet system for my game.
I tried to use BodyVelocity but it didn’t really work out

Im not sure how having bodyposition scaled by distance is a problem. In fact, it can be a good thing. Imagine you get teleported to another map. You would have to wait for your pet to come back, which can take a while if the map is large or far away (which is normally the case).

I am aware but my friend told me to make it this way

Do you have any alternative ways to make this?

It should be the D value (for dampening)
image

I’ve messed around with D but it just makes the time lower of when the object reaches the destination and still scales by distance

https://developer.roblox.com/en-us/api-reference/property/BodyPosition/D

Try a really high number for it. such as 1000000

As I said, I have tried that
Even the hub says that it has to decelerate, which changes speed
image

ok, sorry, I guess I didn’t quite understand what it was you were needing.

It’s alright, but I’m wondering if there is something else I can use other than BodyPosition?

Unsure if this will work but try:

local Speed = script.Parent.BodyPosition.D -- just to get ur wanted speed or u can edit this to a integer of speed u want

while task.wait() do
        script.Parent.BodyPosition.D = Speed*(script.Parent.Position - script.Parent.Parent.outer.Position).Magnitude
	script.Parent.BodyPosition.Position = script.Parent.Parent.outer.Position
end

You could always just cframe it, the only problem is you would loose collision.
I wonder if the new constraints might be able to help with this, I am rather unfamiliar with them, but its worth a look probably.

It kind of falls slowly so yeah

I will, thanks for telling me.

This thread, though old, has the api links to each one.

You, like i mentioned earlier, could try BodyVelocity like this. I already know you tried it before, but heres an example

local speed = 6
while true do 
task.wait()
vel.Velocity = (pet.Position - target.Position) * speed
end