Using self inside a class method called from a hook
β‘ Performanceβ’Updated 2 days agoβ’0 views
The tick hook was calling self.door() as a plain function so self was nil - call it as a method self:door() (colon). To register the hook you can use string.forβ¦
Why does 'attempt to index local self (a nil value)' happen in a class function
The tick hook was calling self.door() as a plain function so self was nil - call it as a method self:door() (colon). To register the hook you can use string.format for the hook name with self's fields.