I want to use module scripts function in a another function. But it seems like it doesnt see the function
function Zombie.Movement(zInfo,clientInfo,ZombieInfo)
local num = 0
RunService.Heartbeat:Connect(function()
if num < 1000 then
clientInfo.Position = zInfo.Position + Vector3.new(math.random(0,0.3),0,0)
ReplicatedStorage.ZombieClient:FireAllClients(clientInfo)
end
end)
end
function Zombie.Spawn(Zombie,path, startingpoint)
--Script(its everything ok with it)
wait(0.1)
Zombie.Movement(zInfo,clientInfo,ZombieInfo)
end
i tried to do it in couroutine.wrap but it printed: invalid argument #1 expected function got nil