Collision Group is not being created

I am creating a collision group in a for loop but it doesn’t create the group. Here’s my code:

for _, player in ipairs(arrayOfPlayers) do
		local CollisionId = player.UserId
		-- Cloning
		local PlayerJeep = Jeep:Clone()
		PlayerJeep.Name = CollisionId
		PlayerJeep.Parent = parent
		-- Collisions
		Collisions.Add(CollisionId, PlayerJeep)
		PhysicsService:CollisionGroupSetCollidable(CollisionId, CollisionId, false)
		PhysicsService:CollisionGroupSetCollidable(CharacterCollisionGroup, CollisionId, false)
		-- Inserting collision groups and jeeps inside the jeeps table
		Main.Jeeps[player] = PlayerJeep
		table.insert(Main.Groups, CollisionId)

It just doesn’t create the collision group

Is there any errors in the output referring to creating a collision group?

No, there are no errors in the output.

You seem to have only made 1 collision group? You need 2 groups to make non collidable or colliable.

The Character collision group is already created when the player joins the game

Maybe put the line of code where you create the other collision group “CollisionId” outside of the loop so it doesn’t create that same collision group over and over. Or you can name it differently each time like,

PhysicsService:CreateCollisionGroup(CollisionId .. player.UserId)