@@ -267,22 +267,22 @@ PhysicsService:RegisterCollisionGroup(CollisionGroupName)
267267PhysicsService :CollisionGroupSetCollidable (CollisionGroupName , CollisionGroupName , false )
268268
269269local function setCollisionGroup (model )
270- -- Apply collision group to all existing parts in the model
271- for _ , descendant in pairs ( model :GetDescendants () ) do
272- if descendant :IsA (" BasePart" ) then
273- descendant .CollisionGroup = CollisionGroupName
274- end
275- end
270+ -- Apply collision group to all existing parts in the model
271+ for _ , descendant in model :GetDescendants () do
272+ if descendant :IsA (" BasePart" ) then
273+ descendant .CollisionGroup = CollisionGroupName
274+ end
275+ end
276276end
277277
278278Players .PlayerAdded :Connect (function (player )
279- player .CharacterAdded :Connect (function (character )
280- setCollisionGroup (character )
281- end )
282- -- If the player already has a character, apply the collision group immediately
283- if player .Character then
284- setCollisionGroup (player .Character )
285- end
279+ player .CharacterAdded :Connect (function (character )
280+ setCollisionGroup (character )
281+ end )
282+ -- If the player already has a character, apply the collision group immediately
283+ if player .Character then
284+ setCollisionGroup (player .Character )
285+ end
286286end )
287287```
288288
0 commit comments