#Problem with mobs moving
61 messages · Page 1 of 1 (latest)
"Main" Script
local map = workspace.FloraFields
local base = require(script.Base)
base.Setup(map, 100)
task.wait(2)
-- base.UpdateHealth(0)
for wave=1, 10 do
print("Wave Starting:", wave)
if wave <= 2 then
mob.Spawn("Zombie", 5, map)
mob.Spawn("FastZombie", 1, map)
elseif wave <= 4 then
for i=1, 5 do
mob.Spawn("Zombie", 25, map)
end
elseif wave <= 7 then
for i=1, 5 do
mob.Spawn("Zombie", 5, map)
mob.Spawn("FastZombie", 10, map)
end
elseif wave <= 9 then
mob.Spawn("Zombie", 5, map)
elseif wave == 10 then
mob.Spawn("Zombie", 5, map)
end
repeat
task.wait(1)
until #workspace.Mobs:GetChildren() == 0
print("Wave Ended!")
task.wait(1)
end```
Also an error I got:
ServerScriptService.Main.Mob:97: ServerScriptService.Main.Mob:37: attempt to index nil with 'Position'
Could anyone please help? Thanks.
Yeah
Not main
But where is it though?
Alright
post the mob module
Here
Ok
I can't use pastebin
y
Here
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
where is mob.move
I feel like
you accidently cut out a lot of it
Oh wtf
Yeah I did, mb
if mobExists then
for i = 1, quantity do
task.wait(0.5)
local newMob = mobExists:Clone()
newMob.HumanoidRootPart.CFrame = map.Start.CFrame
newMob.Parent = workspace.Mobs
-- Set collision group
for i, object in ipairs(newMob:GetDescendants()) do
if object:IsA("BasePart") then
physicsService:SetPartCollisionGroup(object, "Mob")
end
end
-- Handle mob death
newMob.Humanoid.Died:Connect(function()
task.wait(1)
newMob:Destroy()
end)
-- Move the mob towards the target
coroutine.wrap(mob.Move)(newMob, map)
end
else
warn("Requested mob does not exist:", name)
end
end
return mob
** You are now Level 11! **
Could you read the file?
I couldn't see most of the file 😭
💀
Ok
Here
I fixed it https://pastebin.com/XPPSEj8y
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I mean I didn't fix the problem, I just fixed the pastebin.
Have u tried
Tried what?
Have u tried
TRIED WHAT
There's no off and on.
You're a scripter right? Help me plz.
@worthy crag
have you tried
have you tried turning it off and on
