BodyPosition is kinda wonky when a player steps on a part that has it

Hey, I am making a moving platform using BodyPosition, it works fine, but when a player steps on it, it gets wonky, Here’s a screenshot:


Help is very appreciated! Thank you.

Edit the MaxForce of the BodyPosition.
To something like

BodyPosition.MaxForce = Vector3.new(1,1,1)*40000 -- is the same as: Vector3.new(40000,40000,40000)

This will make it so that you can’t push/move the Part around and the BodyPosition takes priority over the position.
How bigger the Vector, how less interverence other forces can give.

wait how do you want it to move? like straight up, to the side. Cause i can make a script that will move it through blocks as well

Oh, thank you for the reply, currently the MaxForce is set to math.huge, Is that why this is happening?

I really do not suggest using math.huge with MaxForce.
I am unsure why it’s happening but it porbaly has something to do with that.

I changed the MaxForce, but it’s still not fixed.

Change the part’s property Massless.

Okay, let me do that, thank you.

Well the platform is probably acting wonky because it is rotating which is hard to tell by am image. To combat rotation you can use a BodyGyro instance or Align orientation to prevent the rotation

Still not working. I need to do this quickly.

Create a new instance called BodyGyro, change it’s MaxTorque to the same as the MaxForce of the BodyPosition;
Put in the following script:

local BG = script.Parent
BG.CFrame = BG.Parent.CFrame

You don’t have to define this, if the part is Orientation is 0,0,0

I think I need to define the CFrame the 1st time I use it, so thank you. Going to try it

I found out the default CFrame of the BodyGyro is to change the Orientation to 0,0,0

It worked! The only problem that is happening now is that when a player steps on it, it goes down. Screenshot:
RobloxScreenShot20201018_043345784

I suggest anchoring the part and unanchoring it inside of the BodyGyro Script:

local BG = script.Parent
BG.CFrame = BG.Parent.CFrame

BG.Parent.Anchored = false

Thanks so much for suggesting me BodyGyro, it’s working just fine as it should!

Rather thank, @dthecoolest, it was his suggestion. Though can you close this topic now and if the BodyGyro still acts weird, just use AlignOrientation like dthecoolest said.

Okay, thank you both of you. THANKs.