so basically i get this warning when i put in this script. ive never used collision groups so i have no idea what this means:
07:06:32.188 SetPartCollisionGroup is deprecated, please use BasePart.CollisionGroup instead. More info: Updates to Collision Groups - Studio
here is the script
local PhysicsService = game:GetService("PhysicsService")
local ServerStorage = game:GetService("ServerStorage")
local mob = {}
function mob.Move(mob, map)
local humanoid = mob:WaitForChild("Humanoid")
local waypoints = workspace.Waypoints
for waypoint=1, #waypoints:GetChildren() do
humanoid:MoveTo(waypoints[waypoint].Position)
humanoid.MoveToFinished:Wait()
end
mob:Destroy()
end
function mob.Spawn(name, quantity, map)
local mobExists = ServerStorage.Mobs:FindFirstChild(name)
if mobExists then
for i=1, quantity do
task.wait(0.5)
local newMob = mobExists:Clone()
newMob.Parent = map.Mob
for i, object in ipairs(newMob:GetDescendants()) do
if object:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(object, "Mob")
end
end
coroutine.wrap(mob.Move)(newMob, map)
end
else
warn("Mob could not be found!", name)
end
end
return mob
they changed physicsservice, it’s not an error it still works fine it’s just a depreciation error like Enum.RaycastFilterType.Blacklist, it wont change anything
function Wave:Spawn()
local WaveData = self.Waves[self.Wave];
local Enemies = WaveData.enemies;
if(not Enemies) then
warn("! Wave " .. self.Wave .. " skipped due to improper formatting. The wave in question: ", self.Waves[self.Wave]);
return;
end
local Map = workspace:WaitForChild("Map")
local Tag = script:WaitForChild("EnemyTag", 2)
if not Tag then
warn("Could not find enemytag. Forcing continuation.")
return;
end
local Waypoints,Path,Settings,Exit,Start = table.unpack(require(Map:FindFirstChildOfClass("ModuleScript")))
local spawning = false;
task.spawn(function()
local cTime = os.time();
spawning = true;
for i,v in pairs(Enemies) do
print(v, Enemies, WaveData);
if cTime + v.SpawnDelay >= os.time() then
for i=1,v.Amount do
task.spawn(function()
local Enemy = ServerStorage.Enemies:FindFirstChild(v.EnemyId)
if Enemy then
Enemy = Enemy:Clone()
for a,b in pairs(Enemy.Head:GetChildren()) do
if b.Name == "HeadWeld" then
b:Destroy();
end
end
local nTag = Tag:Clone()
nTag.Parent = Enemy
nTag.Adornee = Enemy.Head
local rotCFrame = CFrame.lookAt(Start.Position,(Waypoints[1] or Exit).Position)
Enemy.Parent = workspace.EnemyContainer
Enemy.HumanoidRootPart.CFrame = rotCFrame
coroutine.wrap(function()
EnemyManager:CreateEnemy(Enemy);
end)()
else
warn("Enemy " .. v .. " could not be found.")
end
end)
task.wait(v.DelaySpawning or 1);
end
end
end
spawning = false;
end)
while task.wait() do
if ((#workspace.EnemyContainer:GetChildren() == 0 and not spawning) or SkipWave.Value == true) then
break;
end
end
SkipWave.Value = false;
self.WaveTimer:Stop()
self:AdvanceWave()
end
you see how I set the CFrame of the enemy’s humanoidrootpart