Skip to content

Physical

Inherits Dynamic

Inherited by NPC, RigidBody

Physical represents an object affected by physics in the world.

Abstract Object

This object exists only to serve as a foundation for other objects. It cannot be accessed directly, but its properties are documented below.

Additionally, it cannot be created in the creator menu or with Instance.New().

Not newable

This object cannot be created by scripts using Instance.New().

Properties

Anchored : boolean

Determines whether this object is affected by physics.

CanCollide : boolean

Determines whether this object can collide with other objects.

Velocity : Vector3

Determines the linear velocity of this object.

AngularVelocity : Vector3

Determines the angular velocity of this object.

Methods

SetNetworkAuthority → nil

Parameters: plr [ Player ]

Sets the network authority of this object to the specified player.

GetTouching → { Physical }

Parameters: ``

Get all objects that's currently in contact with this object.

MovePosition → nil

Parameters: position [ Vector3 ]

Moves the part to the specified position while keeping physics in mind.

MoveRotation → nil

Parameters: rotation [ Vector3 ]

Rotates the part while keeping physics in mind.

AddForce → nil

Parameters

force [ Vector3 ]

mode [ ForceModeEnum? ]

Add force to this physical

AddTorque → nil

Parameters

force [ Vector3 ]

mode [ ForceModeEnum? ]

Add torque to this physical

AddForceAtPosition → nil

Parameters

force [ Vector3 ]

position [ Vector3 ]

mode [ ForceModeEnum? ]

Add force at position to this physical

AddRelativeForce → nil

Parameters

force [ Vector3 ]

mode [ ForceModeEnum? ]

Add relative force to this physical

AddRelativeTorque → nil

Parameters

torque [ Vector3 ]

mode [ ForceModeEnum? ]

Add relative torque to this physical

Events

Touched

Parameters: hit [ Physical ]

Fires when this object has collide with other object

TouchEnded

Parameters: hit [ Physical ]

Fires when this object has stopped colliding with other object

MouseEnter

Parameters: ``

Fires when cursor is hovered on this object. Only fired locally

MouseExit

Parameters: ``

Fires when cursor leaves this object. Only fired locally

Clicked

Parameters: player [ Player ]

Fires when this object has been clicked by a player