Bodymovers flinging parts with lower gravity

I’m almost sure this is an engine bug but I brought it here just to be safe.

so I was working on a game that requires you to push a trash can to a dumpster in order to win when I noticed the trash can would suddenly fly away while you push it. this didn’t happen until yesterday and I didn’t make any changes to the bodymover that applied the lower gravity so I was confused.

I made some examples to show that BodyForce and the new improved VectorForce both have this issue:


as you can see the parts eventually fly away when I push them around.
is there a way to fix this?

here’s the code I used to make them have lower gravity:

local grav = workspace.Gravity*script.Parent:GetMass()
local body = script.Parent:WaitForChild("BodyForce")

body.Force = Vector3.new(0,grav/1.5,0)
4 Likes

It looks like somthing is hanging Force or velocity of part

2 Likes

there is no other parts besides the baseplate and the two gravity parts. nothing has any stored velocity either.

then turn off script and try again

it’s not an issue with the script. it’s an issue with the bodyMovers. I’ve done a lot of tests and it’s just some weird bug with low gravity parts that use bodyMovers for the effect.

I just wanna know how to fix this.

local mas = script.Parent:GetMass() --outside loop


local grav = workspace.Gravity*mas
local body = script.Parent:WaitForChild("BodyForce")

body.Force = Vector3.new(0,grav/1.5,0)

I don’t see how this would make a difference as the mass is just a number value but I’ll try this.

or

local grav = workspace.Gravity*script.Parent:GetMass()
local body = script.Parent:WaitForChild("BodyForce")

body.Force = Vector3.new(0,math.clamp(grav/1.5, -5, 5),0)
1 Like

that would just make it not have low gravity anymore. I’m trying to have low gravity parts that do not fly away as soon as I interact with them.

Exacly, you just need to set it to right numbers so it will make it low gravity but it wont allow it to fly away

or grav/1.5 - Velocity.Y of part

as I said, this issue wasn’t happening at all until yesterday. it isn’t an issue with velocity or how I’m making the parts have low gravity, It’s just a weird bug with bodymovers.

I will try your solutions but 1 of them still has the issue so far.

I think that would be just roblox because when grav/1.5 it will make weird number that roblox cant handle so maybe use multiply

local grav = workspace.Gravity*script.Parent:GetMass()
local body = script.Parent:WaitForChild("BodyForce")

body.Force = Vector3.new(0,grav*0.66,0)

here’s what happens when the force is only limited to 5. bodyforce uses really small units so you need big numbers to move even the smallest parts. so 5 essentially won’t move anything.

So try using multiply if that dont work then try using bigger numbers in clamp

still happens, and got worse somehow.

Maybe it’s got to do with the network ownership?

that’s what I thought for a while and I did some tests with no network ownership and with network ownership and it still happens. the game that I’m making pretty much requires it though as not having it is torturous and very laggy.

I’ll try doing some tests with networkownershipauto turned off and see if theres any differences.

as you can see having network ownership off does fix the issue. but this still doesn’t change how this just suddenly started happening the other day and completely broke bodymovers on client physics. and as I said before, I do need the trash can in my game to be on client physics otherwise it would be way too glitchy.

It might have to do with the part’s network ownership being moved to the player. (Though that behavior is definitely very strange.)

I wonder if what is going on is that there are different gravity values on the client and server such that when the part’s ownership moves to the client the physics still uses the same bodymover but has a different gravity value.

You could test this by manually setting the ownership of the part to the server or player.