Pathfinding not working with module script but works with normal script in workspace?

Hello guys,
For some reason this simple code:

function MonkeySckriptModule.move()
	local character = workspace.Animals:FindFirstChild("Rig")
	character.Humanoid:MoveTo(Vector3.new(0, character.PrimaryPart.Position.Y, 100))
end

Does not work in the module script when called but works in workspace with a normal script???
(also i did do ‘require’ to use the module and no errors were in the output)
I also used some print statements to check
Could someone help me. Thanks.

e.g

	local character = workspace.Animals:FindFirstChild("Rig")
	character.Humanoid:MoveTo(Vector3.new(0, character.PrimaryPart.Position.Y, 100))

in a normal script this works

After requiring the module, did you call the method that is in that module script?

local required = require(moduleScript)
required.move()

Yes of course i did that. The npc just doesn’t want to move.

Is this a client script requiring the module or a serverside one.

I called it from a local script… I just realised

Probably something to do with network ownership and replication then, if it works in a server script.

I SPENT 2 DAYS WONDERING. iM A DUM DUM

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