Player rolls around for no reason

i need to do a player that even if ragdolled, can move. i did the ragdoll part, and then i used this to make the player move anyways (server script)

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local HRP = char:WaitForChild("HumanoidRootPart")
		local Velocity = Instance.new("BodyAngularVelocity")
		Velocity.Parent = HRP

		while true do
			wait()
			HRP.BodyAngularVelocity.AngularVelocity = Vector3.new(char.Humanoid.MoveDirection.z * 32,0,char.Humanoid.MoveDirection.x * -32)
			HRP.BodyAngularVelocity.MaxTorque = Vector3.new(10000,10000,10000)
			if char.Humanoid.MoveDirection == Vector3.new(0,0,0) then
				HRP.BodyAngularVelocity.MaxTorque = Vector3.new(0,0,0)
			end
		end
	end)
end)

the problem is, the player does strange things, it’s like if he rolls, and i don’t know how to fix it. any help? :sob:


also, it only “walks”. is there any way to make it jump, too? thank you

i dont understand… it supposed to do that or its doing itself and I still don’t get it

it shouldn’t roll around, i dont know what happened

Well its looping maybe there is something with it I think its falling over and over that’s why

Probably is the reason why its rolling around

and how do i fix it? (The at least n characters rule is really annoying)

Never mind, I don’t need this to be fixed

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.