function startRoundGuardMove(whichGuard, guardBlock)
whichGuard.Humanoid:MoveTo(game.Workspace.firstDestination.Position)
whichGuard.Humanoid.MoveToFinished:Wait()
whichGuard.Humanoid:MoveTo(guardBlock.Position)
end
startRoundGuardMove(game.Workspace.gunmen1, game.Workspace.guardBlock1)
wait(1)
startRoundGuardMove(game.Workspace.gunmen2, game.Workspace.guardBlock2)
wait(1)
basically, the point of the script is to try and have two guards move to a certain point
i want them to walk in a line, so i have a delay between calling these functions
however, the 2nd function waits for the previous function to finish before running…
how do i fix this?
also, i tried coroutines, and…
local startRoundGuardMove = coroutine.wrap(function(whichGuard, guardBlock)
whichGuard.Humanoid:MoveTo(game.Workspace.firstDestination.Position)
whichGuard.Humanoid.MoveToFinished:Wait()
whichGuard.Humanoid:MoveTo(guardBlock.Position)
end)
startRoundGuardMove(game.Workspace.gunmen1, game.Workspace.guardBlock1)
wait(1)
startRoundGuardMove(game.Workspace.gunmen2, game.Workspace.guardBlock2)
wait(1)
didnt work, they just walked straight for the second destination and the second guard didnt even start moving…?