Obviously, I know you’d need to grab the player, the part, and part position, but how can i force the player to the position of a part using bodyvelocity?
You can get the direction to move towards a parts position, which corresponds to the velocity the body velocity needs.
I’m lost on this, how do i do this, do I just get a lookvector? If so, how do I get it?
It’s in the post I sent,
Also here is the vector math illustration
I tried this, but it’s not working, it just keeps the player frozen instead of launching them to the part. Thoughts?
local BodyVelocity = Instance.new('BodyVelocity')
BodyVelocity.Velocity = Target.Position - script.Parent.Torso
BodyVelocity.Parent = script.Parent
The velocity needs to be a vector force like this:
BodyVelocity.Velocity = Vector3.new((Target.Position - script.Parent),0,0)
You set the x,y,z to whatever force direction you want. “The Velocity property determines the target velocity towards which force will be exerted.”
so the x will always be in front of you?
Its an axis, so the X will be in front, unless you use a negative value then it will go behind you. The Y will go up or down, depending on positive or negative value. The Z will go left or right depending on value.
should i parent it to the torso to move the player?
Usually you parent to the humanoidrootpart to move your player.
It would be better to use the new body movers
And the alignposition mover would most likely be the best option to use
So you would put a attachment inside the part and then set the alignpositions attachment0 and attachment1 to the charactersrootattachment and the parts attachment and Roblox will move the character towards the part as long as the alignpositions force is strong enough
the new body moverss suck and i dont care what anyone tells me theres barely any good tutorials and body velocity is more simple and way better