Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do collision groups work? My script doesn't work properly?

Asked by 4 years ago
game.PhysicsService:CreateCollisionGroup("Test")
game.PhysicsService:CreateCollisionGroup("Not")
game.PhysicsService:SetPartCollisionGroup(script.Parent, "Test")
game.PhysicsService:SetPartCollisionGroup(workspace.NEIN, "Not")
game.PhysicsService:CollisionGroupsAreCollidable("Test", "Not", false)

print(script.Parent:CanCollideWith(workspace.NEIN))

It prints true, even when I specified that they will not be collidable.

1 answer

Log in to vote
0
Answered by 4 years ago

You're using the wrong method. You want to use CollisionGroupsSetCollidable, not CollisionGroupsAreCollidable.

Ad

Answer this question