Unable to move with Linear Velocity

Hello! I’m trying to make a GUI Movement system. I’m unable to move my player character at all with linear Velocity. I’ve tried just running the game and adding the attachment > Linear Velocity. It works when I add LV onto a normal part but when it’s on my character I cant move at all?
Here’s my code and thanks!

local function walkspeedFunc()
	local attachment = Instance.new("Attachment")
	attachment.Visible = false
	local velocity = Instance.new("LinearVelocity")
	velocity.MaxForce = 999999999
	velocity.VelocityConstraintMode = Enum.VelocityConstraintMode.Plane
	velocity.PrimaryTangentAxis = Vector3.new(1,0,0)
	velocity.SecondaryTangentAxis = Vector3.new(0,0,1)
	if walkspeedEnabled then
		attachment.Parent = Player.Character:WaitForChild("UpperTorso")
		velocity.Parent = attachment
	while walkspeedEnabled do
		velocity.PlaneVelocity = Vector2.new(varHum.MoveDirection.X,varHum.MoveDirection.Z) * 20
		if not walkspeedEnabled then
			attachment.Parent = nil
			velocity.Parent = nil

Moving a Humanoid isn’t the same as moving a Part because they are controlled by the client.
I’ve seen quite a few posts about “player push back”, “player shove”, or “applying forces to humanoids” on the forums. Try using the Search tool up top to see if a previous post has the answer you need.


Thanks for your response! I did try searching first. It seems like the answers have been to use BodyMovers or BodyVelocity. I checked out those on the Dev Wiki but it said those two are depreciated and to use Linear Velocity. I’ve tried maxing all of the values out but still unable to move?

Any further insight appreciated. Thanks!

You forgot to set the attachment 0 for linear velocity.