How to filter ENT:StartTouch?

I have this problem where I’ve made a triggerable entity and it will be triggered by everything. Is there a way to make it so that only “prop_physics” entities will fire my output? I’ve tried with some “if statements” inside a StartTouch, but I’m not quite sure how to go forward on this. And from what I’ve read on the wiki, PassesTriggerFilters is broken.

function ENT:StartToucn(other)
    if other:GetClass() ~= "prop_physics" then return end
    -- your code here

This seems like it doesn’t work when nested in a “ents.Create”, at least.
Something like this:

trigger = ents.Create( "base_anim" )
trigger.StartTouch = function( other )
    if other:GetClass() ~= "prop_physics" then return end

And I’ve tried something similar. I will try making my own entity and see if it works then.

This is wrong, you’re forgetting “self” argument, this would be correct:

trig.StartTouch = function(self, other)

This works perfectly. Thank you, been bothering me for days. It’s always something simple. :hammered: