Physics
local physics = game:get('Physics')
Physics service provides signals and utilities related to physics world.
Signals
onCollisionStart:connect(handler: (event: CollisionEvent): void): void
Triggered when two entities start colliding.
local physics = game:get('Physics')
physics.onCollisionStart:connect(function(e)
local a = e.a
local b = e.b
end)
Parameters:
event
: Collision event
onCollisionEnd:connect(handler: (event: CollisionEvent): void): void
Triggered when two entities end colliding.
local physics = game:get('Physics')
physics.onCollisionEnd:connect(function(e)
local a = e.a
local b = e.b
end)
Parameters: