How can you make it so that you can call a method on anything?

So I’m working on a module, so I want its functions to be able to be called on any AnimationTrack without me having to make a new class, so that I can use self. How do I do it? Or is it not possible, and I have to create a new class.

Like for example, If I have a function called :PlayEased(), how do I make it so that it’s able to be called on anything without me having to make a new class?

Sorry if I sound dumb, I’m new to metatables and OOP

The behavior you’re looking for is called wrapping. Unfortunately you will have to create a new class that acts as a wrapper for the AnimationTrack or whatever class you want to add new methods for.

1 Like

Oh okay. Thanks for the info though