So I’m a new scripter and I’ve always wanted to make a tower defense game. Something I’m struggling with is making an easier/efficient way to make the zombies walk along the paths.
-
What do you want to achieve?
Use a more efficient way to make my zombies move around in a tower defense game i’m trying to making. -
What is the issue?
The code I use sort of works but it’s not that good. I feel like I could do something that’s a lot more efficient. Here’s the code for example.
local hum = script.Parent:WaitForChild("Humanoid")
local torso = script.Parent:WaitForChild("Torso")
hum:MoveTo(game.Workspace.endingpart1.Position)
wait(6.8)
hum:MoveTo(game.Workspace.endingpart2.Position)
wait(5.8)
hum:MoveTo(game.Workspace.endingpart3.Position)
wait(7.3)
hum:MoveTo(game.Workspace.endingpart4.Position)
wait(15)
hum:MoveTo(game.Workspace.endingpart5.Position)
Here’s what the map is like.
-
What solutions have you tried so far?
I’ve looked at TheDevKing’s pathfinding video and saw you can make NPCs travel to another part’s location. I’ve also looked around the forum posts but they say stuff a little confusing to me because I’m a new scripter.
I accept constructive criticism