Why the character is not moving?

I am developing a top down game and my character is not moving when i click at it
this is the local script

mouse.Button1Down:Connect(function()
	if mouse.Target and mouse.Target.Parent:HasTag("Unit",true) then
		char:AddCharacter(mouse.Target.Parent)
	end
	if char:IsActive() then
		print(2)
		char:MoveToLocation(Vector3.new(100,0,1000))
	end
end)

Module script:

local characterFunctions = {}

characterFunctions.character = nil

function characterFunctions:AddCharacter(char)
	characterFunctions.character = char
	print("success")
end
function characterFunctions:MoveToLocation(Pos: Vector3)
	if characterFunctions.character then
		print("Moving To")
		if characterFunctions.character.Humanoid then
			print(5)
		end
		characterFunctions.character.Humanoid:MoveTo(Pos)
		characterFunctions.character.Humanoid.MoveToFinished:Wait()

	end
end
function characterFunctions:IsActive()
	if characterFunctions.character then
		return true
	else
		return false
	end
end

return characterFunctions

world-map-306338_1920
Every thing seems to print normal but only the character is not moving

in your IsActive function try adding

if characterFunctions.character ~= nil

See if this fixes it.

1 Like

Have you checked if a part inside the character is anchored? The character won’t move if one of its parts are.

1 Like

I fixed it by placing the rig inside replicated storage