PhysicsService
Registers collision groups and configures collision relationships.
- Service
game:GetService("PhysicsService")- Inherits
- Instance
- Replication
- Never
Behavior
PhysicsService registers collision groups and configures collision relationships.
Summary
Returns whether the Part belongs to the specified collision group.
Sets whether Parts in the two collision groups can collide.
Returns whether the two collision groups are allowed to collide.
Creates a named collision group and returns its identifier.
Returns the name associated with a collision-group identifier.
Returns this instance if it is an ExecutionGroup.
Returns the registered collision groups.
Returns whether the named collision group exists.
Registers a named collision group.
Assigns a Part to the named collision group.
Removes a registered collision group.
Methods
CollisionGroupContainsPart
PhysicsService:CollisionGroupContainsPart(name: string, part: BasePart): booleanReturns whether the Part belongs to the specified collision group.
CollisionGroupSetCollidable
PhysicsService:CollisionGroupSetCollidable(name1: string, name2: string, collidable: boolean): ()Sets whether Parts in the two collision groups can collide.
CollisionGroupsAreCollidable
PhysicsService:CollisionGroupsAreCollidable(a: string, b: string): booleanReturns whether the two collision groups are allowed to collide.
CreateCollisionGroup
PhysicsService:CreateCollisionGroup(name: string): ()Creates a named collision group and returns its identifier.
GetCollisionGroupName
PhysicsService:GetCollisionGroupName(part: BasePart): stringReturns the name associated with a collision-group identifier.
GetExecutionGroup
PhysicsService:GetExecutionGroup(): ExecutionGroup?Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.
GetRegisteredCollisionGroups
PhysicsService:GetRegisteredCollisionGroups(): tableReturns the registered collision groups.
IsCollisionGroupRegistered
PhysicsService:IsCollisionGroupRegistered(name: string): booleanReturns whether the named collision group exists.
RegisterCollisionGroup
PhysicsService:RegisterCollisionGroup(name: string): ()Registers a named collision group.
SetPartCollisionGroup
PhysicsService:SetPartCollisionGroup(part: BasePart, name: string): ()Assigns a Part to the named collision group.
UnregisterCollisionGroup
PhysicsService:UnregisterCollisionGroup(name: string): ()Removes a registered collision group.
Inherited members
- Properties
- ArchivableClassNameNameParent
- Methods
- AddComponent()AddTag()ClearAllChildren()ClearTags()Clone()Destroy()FindFirstAncestor()FindFirstAncestorOfClass()FindFirstAncestorWhichIsA()FindFirstChild()FindFirstChildOfClass()FindFirstChildWhichIsA()FindFirstDescendant()GetAttribute()GetAttributeChangedSignal()GetAttributes()GetChildren()GetComponent()GetComponentChangedSignal()GetComponents()GetDebugId()GetDescendants()GetFullName()GetPropertyChangedSignal()GetReferencing()GetTags()HasComponent()HasTag()IsA()IsAncestorOf()IsDescendantOf()RemoveComponent()RemoveTag()SetAttribute()WaitForChild()
- Events
- AncestryChangedAttributeChangedChangedChildAddedChildRemovedDescendantAddedDescendantRemovingDestroying