i am having a lot of trouble with making my custom character walk
error is at line 17
local player = script.Parent
local humanoid = player.Humanoid
local walk = script:WaitForChild("walk")
local walk_anim = humanoid.Animator:LoadAnimation(script.walk)
local walking_value = script.walking.Value
local player = game.Players.LocalPlayer
local speed = humanoid.MoveDirection
--walk_anim:Play()
function moved()
--walk_anim:Play()
--print("played animation")
if speed == Vector3.new(0,0,0) then
walk_anim:Stop()
end
if speed > Vector3.new(0,0,0) then
print("player moved")
walk_anim:Play()
end
end
while true do
humanoid.Changed:Connect(moved)
print("fired function")
wait(0.1)
end

3 comments
.MovedDirection returns a vector3
try using CFrame
jeremqmfpi can you check my answer. if it helped you, please accept it!