:Move() function not working on humanoid

So I’m trying to use :Move(Vec3) on the players humanoid but the character isn’t even moving an inch.
I know my script is a local script and it’s maybe problematic but I want my script to work on client side, so I wrote the following script:

local player =  game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

local text_button = player.PlayerGui:WaitForChild("ScreenGui").TextButton

text_button.MouseButton1Click:Connect(function()
	char.Humanoid:Move(Vector3.new(1,0,1), false)
end)

Is it possible to do this on client side?

When this function is called, the Humanoid will move until the function is called again. However, if the default control scripts are being used this function will be overwritten when called on Player Characters. This can be avoided by either not using the default control scripts, or calling this function every frame using RunService:BindToRenderStep().

ok, so in order to make it work you need to disable the player controls by using:

local LocalPlayer = game:GetService("Players").LocalPlayer
local Controls = require(LocalPlayer.PlayerScripts.PlayerModule):GetControls()

Controls:Disable()

I’m having this issue but I’ve already disabled the default control scripts. I re-enabled them to call Controls:Disable() and still not luck. The Humanoid’s MoveDirection property is updating properly and no parts are anchored. Network ownership is set properly for me as well.

1 Like

An unaccounted for line was setting the humanoid walkspeed to nil, another thing for people having this issue to check.

1 Like

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