this is my mob script,
local ServerStorage = game:GetService("ServerStorage")
local mob = {}
function mob.Move(mob, map)
local humanoid = mob:WaitForChild("Humanoid")
local waypoints = map:WaitForChild("Waypoints")
for waypoint=1, #waypoints:GetChildren() do
Humanoid:MoveTo(waypoints[waypoint].Position)
Humanoid.MoveToFinished:Wait()
end
end
function mob.Spawn(name, map)
local mobExists = ServerStorage.Mobs:FindFirstChild(name)
if mobExists then
local newMob = mobExists:Clone()
newMob.HumanoidRootPart.CFrame = map.Start.CFrame
newMob.Parent = workspace
mob.Move(newMob, map)
else
warn("Requested mob does not exist", name)
end
end
return mob
** You are now Level 3! **