When I place a tower this error comes up ServerScriptService.Main.Tower:51: ServerScriptService.Main.Tower:15: attempt to index nil with 'HumanoidRootPart'
my mobs have Root Parts and before I show the code WaitForChild does not work, here's line 15 local distance = (target.HumanoidRootPart.Position - newTower.HumanoidRootPart.Position).Magnitude
and here's line 51 coroutine.wrap(tower.Attack)(newTower)
I'm watching a tutorial and it said this is how line 10 should be to get line 15 working but has you can see its still not working function FindNearestTarget(newTower)
line 10 is not the problem I think I just though I should include it and it said in the tuturiul it was ok if the animations not working.
