Forces making the character fly away when hitting parts

I’m trying to make a teleport script by using forces
but the character flies away when it touches anchored or bigger parts.

This is what happens:
https://i.gyazo.com/ff7e7fb5c12ae8e01879ae108aa18bdd.mp4

This is the part of the code where I insert the force, rn I’m trying with a body position


(also the velocity gets removed after 0.5 seconds)

How can I prevent this?
I’ve tried searching on the dev hub and here but I didn’t find anything.

Alternatively you could set the HumanoidRootPart’s CFrame to where you want the character to be

Well, that’s what’s supposed to happen. If you know the 3rd law of Newton, when the character flies into an anchored part at super speed, a"normal" force is exerted on the character which is equal to the force at which the player hit the anchored part (in this case, math.huge) and its direction is the normal of the touched surface of the part, so the initial velocity is greatly influenced and the player is flung.

Why don’t you just use
playerCharacter:SetPrimaryPartCFrame(CFrame.new(targetVector3))

Moving it with the CFrame makes it go inside walls and stuff like that.
The idea was to make an invisible dash so it doesn’t go through walls.

Well, you could use raycasting :FindPartOnRay(), get the normal at the desired position, and then offset the cframe in that direction by half of the player’s size, so that it doesn’t get stuck in walls or terrain

I’d set the HumanoidRootPart’s CFrame at the desired position first, then manipulate the camera to achieve the “invisible dash” effect

You are saying you are “insert the velocity” but you are using a BodyPosition. I can tell you are using a BodyPosition because your code says Instance.new("BodyPosition"). There is literally no mention of “Velocity” anywhere in your code.

Instead, why don’t you actually use a velocity BodyMover?