I am trying to work with collision group to make player not collide with other player and the mobs / also the mobs to be not collide with other mobs.
But the script that I’ve made and the collision group is not working
I can’t figure out what’s the error and their is no error in the output
ask for more detailed
here is the collision group
here is the part of the script for the mob collision group
local newMob = mobExists:Clone()
newMob.HumanoidRootPart.CFrame = map.Start.CFrame
newMob.Parent = map.Mob
for i, object in ipairs(newMob:GetDescendants()) do
if object:IsA("Part") then
object.CollisionGroup = "Mob"
end
end
here is the script for the player collision group
local Players = game:GetService("Players")
local PhysicService = game:GetService("PhysicsService")
Players.PlayerAdded:Connect(function(player)
player.CharacterAppearanceLoaded:Connect(function(character)
for i, object in ipairs(character:GetDescendants()) do
if object:IsA("Part") then
object.CollisionGroup = "Player"
end
end
end)
end)