Part and entity leave touch event||doc135538

September 20, 2022

Format

 ENTITY_TOUCH_PART_END
  • The class to which the function belongs:Entity

Description

The event is triggered when the solid object and the part leave the touch.


Precautions

  • Only valid for player entities

Context

The context content of the event

name type Description
obj1 Entity object instance
part part Part instance


Code Samples

On the server side of the entity templatemount script, register this type of entity object and the part to leave the touch trigger event

Trigger.RegisterHandler(this:cfg(), "ENTITY_TOUCH_PART_END", function(context)
    local from = context.obj1
    local part = context.part
    print('touch part !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
end)