Only the module in the upper line work

i have written two functions of two different modules one called turn and one called shoot both modules work fine but if i call the functions, only the function in the upper line will execute

spawn(ShootModule.Shoot(Object,plyr))
spawn(TurnModule.turn(Target,Object,plyr,LastPosition))

i this case my object shoots but will not turn. If i would call the turn function in the upper line then it will turn but not shoot

Hello @DevDrip_Osa, it seems that something is yielding your code and that could be the issue to your problem. Instead of using spawn, you can try putting your code in a more efficient task called coroutine.

This is something you can try:

coroutine.wrap(function()
   --// Code
end)() --// Be sure to call the coroutine

Please edit your post to include the module code so we can see what its calling.