need help with entity networking

hi,

ive been trying to learn Glua and ive followed some tutorials and made the chair thrower, made some variations.etc

right now im trying to grab a chair thrown by the chair thrower and when it collides with the ground make it explode in multiple chairs.
the question im having right now how do i get glua to fire code from init.lua the moment it touches the ground, ive tried functions such as ENT:OnTakeDamage or ENT:PhysicsCollide but i cant get those to even fire a simple thing like print()

chair thrower code : https://wiki.garrysmod.com/page/Chair_Throwing_Gun

Check the wiki page of

ENT:PhysicsCollide.

Since the chair is a physics prop, you have to use

Entity:AddCallback.



chair:AddCallback( "PhysicsCollide", function( data, collider )
    print( "COLLIDED!" )
end )