local A=game:GetService("\080\104\121\115\105\099\115\083\101\114\118\105\099\101")local X=game:GetService("\083\101\114\118\101\114\083\116\111\114\097\103\101")local U=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local r=require(X.Source.DescendantsCollisionGroup)local l=require(U.Source.ComponentCreator)local b=require(X.Source.CollisionGroup)local q=require(U.Source.SharedConstants.CollectionServiceTag.CharacterTag)local v={}function v.start()A:RegisterCollisionGroup(b.Character)A:RegisterCollisionGroup(b.Wagon)A:CollisionGroupSetCollidable(b.Character,b.Wagon,false)A:CollisionGroupSetCollidable(b.Wagon,b.Wagon,false);(l.new(q.Character,r,b.Character)):listen()end return v


local PhysicsService = game:GetService("PhysicsService")
local ServerStorage = game:GetService("ServerStorage")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local DescendantsCollisionGroup = require(ServerStorage.Source.DescendantsCollisionGroup)
local ComponentCreator = require(ReplicatedStorage.Source.ComponentCreator)
local CollisionGroup = require(ServerStorage.Source.CollisionGroup)
local CharacterTag = require(ReplicatedStorage.Source.SharedConstants.CollectionServiceTag.CharacterTag)

local CollisionGroupManager = {}

function CollisionGroupManager.start()
	PhysicsService:RegisterCollisionGroup(CollisionGroup.Character)
	PhysicsService:RegisterCollisionGroup(CollisionGroup.Wagon)
	PhysicsService:CollisionGroupSetCollidable(CollisionGroup.Character, CollisionGroup.Wagon, false)
	PhysicsService:CollisionGroupSetCollidable(CollisionGroup.Wagon, CollisionGroup.Wagon, false)

	-- DescendantsCollisionGroup.new() will be called with the Character model, CollisionGroup.Character as the arguments
	ComponentCreator.new(CharacterTag.Character, DescendantsCollisionGroup, CollisionGroup.Character):listen()
end

return CollisionGroupManager
