Skip to content
Roblox API Reference

PhysicsService

Service that provides methods for creating and managing collision groups, which control whether sets of BaseParts collide with each other.
  • Not creatable
  • Service
Memory category
Instances
Own members
18
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods59

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byPhysicsService17
  • PhysicsService:CollisionGroupsAreCollidable(name1: string,name2: string,): boolean
    Returns whether the two groups will collide.
    • Capabilities: Physics
    • Simulation access
    Parameters
    ParameterDescription
    name1: string
    The name of the first collision group.
    name2: string
    The name of the second collision group.
    Returns
    TypeDescription
    boolean
    true if the two groups are set to collide, false otherwise. Also returns true if either group is unregistered.
  • PhysicsService:CollisionGroupSetCollidable(name1: string,name2: string,collidable: boolean,)
    Sets the collision status between two groups.
    • Capabilities: Physics
    • Simulation access
    Parameters
    ParameterDescription
    name1: string
    The name of the first collision group.
    name2: string
    The name of the second collision group.
    collidable: boolean
    Whether the two groups should collide with each other.
  • PhysicsService:GetMaxCollisionGroups(): number
    Returns the maximum number of collision groups.
    • Capabilities: Physics
    • Simulation access
    Returns
    TypeDescription
    number
    The maximum number of collision groups supported, currently 32.
  • PhysicsService:GetRegisteredCollisionGroups(): { any }
    Returns a table with info on all of the place's collision groups.
    • Capabilities: Physics
    • Simulation access
    Returns
    TypeDescription
    { any }
    An array of tables, each containing name (string) and mask (integer) fields for a registered collision group.
  • PhysicsService:IkSolve(part: BasePart,target: CFrame,translateStiffness: number,rotateStiffness: number,)
    • Roblox script security
    • Capabilities: Physics
    Parameters
    Parameter
    part: BasePart
    target: CFrame
    translateStiffness: number
    rotateStiffness: number
  • PhysicsService:IsCollisionGroupRegistered(name: string): boolean
    Checks if a collision group is registered.
    • Capabilities: Physics
    • Simulation access
    Parameters
    ParameterDescription
    name: string
    The name of the collision group to check.
    Returns
    TypeDescription
    boolean
    true if a collision group with the given name is registered, false otherwise.
  • PhysicsService:LocalIkSolve(part: BasePart,target: CFrame,translateStiffness: number,rotateStiffness: number,)
    • Local user security
    • Capabilities: Physics
    Parameters
    Parameter
    part: BasePart
    target: CFrame
    translateStiffness: number
    rotateStiffness: number
  • PhysicsService:RegisterCollisionGroup(name: string)
    Registers a new collision group with the given name.
    • Capabilities: Physics
    • Simulation access
    Parameters
    ParameterDescription
    name: string
    The name of the collision group to register.
  • PhysicsService:RenameCollisionGroup(from: string, to: string)
    Renames specified collision group.
    • Capabilities: Physics
    • Simulation access
    Parameters
    ParameterDescription
    from: string
    The current name of the collision group to rename.
    to: string
    The new name for the collision group.
  • PhysicsService:UnregisterCollisionGroup(name: string)
    Unregisters the collision group for the given name.
    • Capabilities: Physics
    • Simulation access
    Parameters
    ParameterDescription
    name: string
    The name of the collision group to unregister.
  • PhysicsService:CollisionGroupContainsPart(name: string, part: BasePart): boolean
    Deprecated: This method has been deprecated. It's recommended that you query a part's collision group through its CollisionGroup property.
    Returns whether the part is in the collision group.
    • Deprecated
    • Capabilities: Physics
    Parameters
    ParameterDescription
    name: string
    The name of the collision group to check.
    part: BasePart
    The BasePart to check for membership in the collision group.
    Returns
    TypeDescription
    boolean
    true if the part belongs to the specified collision group, false otherwise.

    Use CollisionGroup instead.

  • PhysicsService:CreateCollisionGroup(name: string): number
    Deprecated: This method has been superseded by RegisterCollisionGroup() which should be used for all new work.
    Creates a new collision group with the given name, and returns the ID of the created group.
    • Deprecated
    • Capabilities: Physics
    Parameters
    ParameterDescription
    name: string
    The name of the new collision group to create.
    Returns
    TypeDescription
    number
    The integer ID assigned to the newly created collision group.

    Use RegisterCollisionGroup instead.

  • PhysicsService:GetCollisionGroupId(name: string): number
    Deprecated: This method has been deprecated. It's recommended that you query collision groups by name through a part's CollisionGroup property.
    Returns the ID of the collision group with the specified name.
    • Deprecated
    • Capabilities: Physics
    Parameters
    ParameterDescription
    name: string
    The name of the collision group being retrieved.
    Returns
    TypeDescription
    number
    The ID of the retrieved collision group, or nil if no such group exists.

    Use CollisionGroup instead.

  • PhysicsService:GetCollisionGroupName(name: number): string
    Deprecated: This method has been deprecated. It's recommended that you query collision groups by name through a part's CollisionGroup property.
    Returns the name of the group with the corresponding ID.
    • Deprecated
    • Capabilities: Physics
    Parameters
    ParameterDescription
    name: number
    The integer ID of the collision group to look up.
    Returns
    TypeDescription
    string
    The name of the collision group with the given ID, or an empty string if the ID has not been assigned to a group.

    Use CollisionGroup instead.

  • PhysicsService:GetCollisionGroups(): { any }
    Deprecated: This method has been superseded by GetRegisteredCollisionGroups() which should be used for all new work.
    Returns a table with info on all of the place's collision groups.
    • Deprecated
    • Capabilities: Physics
    Returns
    TypeDescription
    { any }
    An array of tables, each containing name (string), id (integer), and mask (integer) fields for a registered collision group.

    Use GetRegisteredCollisionGroups instead.

  • PhysicsService:RemoveCollisionGroup(name: string)
    Deprecated: This method has been superseded by UnregisterCollisionGroup() which should be used for all new work.
    Removes the collision group with the given name.
    • Deprecated
    • Capabilities: Physics
    Parameters
    ParameterDescription
    name: string
    The name of the collision group to remove.

    Use UnregisterCollisionGroup instead.

  • PhysicsService:SetPartCollisionGroup(part: BasePart, name: string)
    Deprecated: This method has been deprecated. It's recommended that you set a part's collision group by name through its CollisionGroup property.
    Sets the collision group of a part.
    • Deprecated
    • Capabilities: Physics
    Parameters
    ParameterDescription
    part: BasePart
    The part being set.
    name: string
    The name of collision group that the part's collision group is being set to.

    Use CollisionGroup instead.

Events11

Inherited fromObject1
Inherited fromInstance9
Defined byPhysicsService1
  • PhysicsService.CollisionGroupCollidableChanged: RBXScriptSignal<(collisionGroupIndex1: number,collisionGroupIndex2: number,)>
    • Hidden
    • Roblox engine security
    • Capabilities: Physics
    Parameters
    Parameter
    collisionGroupIndex1: number
    collisionGroupIndex2: number