How to know wich object called a function in a Module Script

  1. What do you want to achieve? Keep it simple and clear!
    I have a zombie with a script inside of it that calls a function in a module script. I want the function called to know wich zombie called it. How can i do this?

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried using “self” but i am not really sure how to use it.

this is the function i have in my module script

module.moveMonster = function()
	local pathsFolder = game.Workspace:WaitForChild("Paths")
	local cornerFolder = pathsFolder:WaitForChild("Corner")
	
	local NPC = 
end

You should pass it (the zombie, or a globally unique identifier along with a global table of zombie or something along those lines) as a parameter to the function, afaik you can’t access the calling script’s variables so you need to pass all the necessary info. self wouldn’t be of use here because it’d just be the module itself which doesn’t help you with anything.

oh i forgot that was a thing. Thanks