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.