Skip to content

Commit 7c10c47

Browse files
authored
Apply suggestions from code review
1 parent 9e585be commit 7c10c47

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

content/en-us/workspace/collisions.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -267,22 +267,22 @@ PhysicsService:RegisterCollisionGroup(CollisionGroupName)
267267
PhysicsService:CollisionGroupSetCollidable(CollisionGroupName, CollisionGroupName, false)
268268

269269
local 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
276276
end
277277

278278
Players.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
286286
end)
287287
```
288288

0 commit comments

Comments
 (0)