OnCollisionEnd||doc136717

September 20, 2022

Format

local event = BasePart:GetEvent("OnCollisionEnd")

Describe

Triggered when the part ends the collision.

Callback function parameters

Type name introduce
BasePart selfPart Current part
Instance other The other instance that stopped collision

Code example

Register the part collision event on the server

local map = World:GetStaticMap("map001")
local part1 = Instance.new("Part", map.Root, {
    Position = Vector3.new(0,1,0)
})

local part2 = Instance.new("Part", map.Root, {
    Position = Vector3.new(0,3,0)
})

local event = part1:GetEvent("OnCollisionEnd")
event:Bind(function(selfPart, other)
    print("OnCollisionEnd!", selfPart, other)
end)