You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Im TRYING to make a tower defense game -
What is the issue? Include screenshots / videos if possible!
The zombie moves fine, but a bit after it reaches the first waypoint (after the start waypoint) it skips the second waypoint and moves to the third waypoint (end waypoint as the map is temporary and simple)
(i had to use a bunch of screenshots because video record wasnt working in Run for some reason) -
What solutions have you tried so far? Did you look for solutions on the Creator Hub?
I added another waypoint in between 1st and 2nd, it worked, but i dont want to do this as i might make big maps and need a lot of them.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local map = game.Workspace:WaitForChild("Map")
local waypointsFolder = map:WaitForChild("Waypoints")
local amountOfWaypoints = 2
local startPoint = waypointsFolder:WaitForChild("Start")
local endPoint = waypointsFolder:WaitForChild("End")
local zombie = script.Parent
local humanoid = zombie:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local animation = script:WaitForChild("WalkAnimation")
-- Move to start point and play animation
local animTrack = animator:LoadAnimation(animation)
animTrack:Play()
humanoid:MoveTo(startPoint.Position)
humanoid.MoveToFinished:Wait()
-- Move through waypoints
for i = 1, amountOfWaypoints do
local waypoint = waypointsFolder:WaitForChild(i)
humanoid:MoveTo(waypoint.Position)
humanoid.MoveToFinished:Wait()
end
-- Move to end point
humanoid:MoveTo(endPoint.Position)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.






