Help with detecting player movement

Hi I have a problem with player movement detection i want to detect player movement but ignore Humanoid:MoveTo()

my actual code

local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local runservice = game:GetService("RunService")
runservice:BindToRenderStep("move", Enum.RenderPriority.Character.Value + 1, function()
	if player.Character then
		local humanoid = player.Character:FindFirstChild("Humanoid")
		if moving then
			print("---")
			moving = false
		end
	end
end)

any ideas on how I can detect player moves that ignore MoveTo()
I want to work on mobile and computer

1 Like

My idea is to try using the player module :GetMovementVector function. It should be compatible for both mobile and computer while also ignoring :MoveTo since it should be based on player input (joystick, wasd).

IDK haven’t tested it out good place to start I guess.

1 Like

Im not to sure about this but wouldnt using a little mini version of a state machine work?

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