Body Force is glitchy and the object freezes mid air

I’m making it so that you can pick up objects and throw them around. The picking part is working fine but the throwing part is glitchy and sometimes the object freezes mid air. Here’s the code related to the throwing object part:

local function FlingObject()

if hitbox then

    local mouseHit = playerMouse.Hit
    local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
    local object = hitbox.Parent
    local objectWeld = hitbox:FindFirstChild("ObjectWeld")

    local bodyForce = Instance.new("BodyForce")
    bodyForce.Force = (mouseHit.Position).Unit * velocityAmplifier
    bodyForce.Parent = hitbox

    if objectWeld then
        print("Destroying weld")
        objectWeld:Destroy()
    end

    object.CanCollide = true

    hitbox = nil
    Debris:AddItem(bodyForce, debrisTime)
end

end

The value of velocityAmplifier is: 2500 and debrisTime: 0.2

Video:

Try to set the network owner to the client and check if anything else is anchoring it. For more information, after the object is frozen, is anything inside the model Anchored?

1 Like

I checked that, there is nothing that is anchored. How do you set the network owner to client? and what does that do?

Still not fixed, if you know anything please feel free to suggest something.

Did you try hitbox.Velocity?, (This text exists for more 3x10 chars)

https://developer.roblox.com/en-us/articles/Network-Ownership

1 Like

Tried body velocity, it’s also glitchy…

How would it change this though?

I’m pretty sure your issue is due to the NetworkOwnership of the thrown item transferring from your Client to the Server. When it passes from one to the other it takes a split second, causing lag and glitches in some cases.

1 Like

Also what do you think the most suitable body mover for this would be?

I don’t think the BodyForce you are using is the problem, but you could give VectorForce a try.
As @lanjtlike said, if you set the NetworkOwnership of the thrown item to the Client it would look better for you, but others may see it lag.