Bodyforce not applying force

I’m trying to apply a body force to the HumanoidRootPart of a character and I’ve been trying to figure this out for hours. I’ve tried everything from changing network ownership to just changing the assembly linear velocity instead of using a body force.
this is my current code:

	local speed = 1000
			--local part = Instance.new("Part", workspace)
			local BF = Instance.new("BodyForce", Root)
			--part.Position = Root.Position + Vector3.new(0, 6,0)
			Root.Parent.Humanoid.StateChanged:Connect(function(old, new)
				print(old, new)
			end)
			game.ReplicatedStorage.stateChange:FireClient(playersService:GetPlayerFromCharacter(Root.Parent), Enum.HumanoidStateType.Ragdoll)
			print(Root.Parent.Humanoid:GetState())
			wait(3)
			local function RIGHT()--THROW TO RIGHT
				local bossRootVector = self.Root.CFrame.RightVector
				local worldVector = self.Root.CFrame:VectorToWorldSpace(bossRootVector)
				--local plrObjectVector = Root.CFrame:VectorToObjectSpace(worldVector)
				BF.Force = worldVector * speed--plrObjectVector * speed
				--Root.AssemblyLinearVelocity = worldVector * (Root:GetMass() * speed)
				print(worldVector * 100)
			end
RIGHT()

ignore the comments and prints.

Solution 1:

Speed is going to be the force its hitting with, not exactly its speed.

In this case, your force, is way too low. Try something like 10,000 and shift that number around for desired result. Do note that it goes from not moving at all to flinging into the badlands pretty quick.

Solution 2:

Do solution 1, except try BasePart:ApplyImpulse() on the humanoidrootpart.

Well I name it speed becuase it is giving a length to the direction vector and I already have it to use the mass of the HumanoidRootPart to make it move so the speed variable is not the problem + Ive tried setting it to like 100000 LOL. Ill try the applyImpulse though. EDIT: I tryed it and it still doesnt work.

NVM I figured out the problem. Thanks for the help!

1 Like