Override Parant Object function but still able to call it?

I new to lua OOP and wanted to ask is there a way to override a parents function but still be able to call it

Example:

local ParentObject = {}
ParentObject.__Index = ParentObject

function ParentObject.Print()
    print("this is the parent")
end

local ChildObject = {}
ChildObject.__Index = ChildObject
setmetatable(ChildObject, ParentObject)

function ChildObject.Print()
    self.ParentObjectPrint() -- Don't know how to do this
    print("this is the child")
end

so calling the functions will look like:

ParentObject.Print()
-- Prints 'this is the parent'

ChildObject.Print()
--Prints 'this is the parent' then prints 'this is the child' directly after

Sort of find a way to do it by storing the function inside the child like this:

ChildObject.ParentObjectPrint = PararentObject.Print()

and I can call it but the problem it won’t accept any args, the args just become nil

In this exact situation, you can call ParentObject.Print() directly.

But what you have here isn’t super standard OOP, these are fully static classes (i.e. there’s no instances or new).

These were just example
It would more of this

local child = ChildObject.new() --just image I have a .new() function
child.Print() -- I would still want to print the parent function BUT 
                   -- the parent function self will now = to the child

Can you come up with a fully working example except for that one line, just so we have common thing to look at? There are a lot of ways to do inheritance in lua so it would be helpful to know exactly how you’re doing it.

You’ve indicated that you are having problems with the self variable.

To use self you have to use the self-iterator. To do this, you’ll need to make it a namecall method with a colon instead of a period.

local foo = {}

function foo:bar(...)
	print(type(self.bar))
end

function foo.bar(self, ...)
	print(type(self.bar))
end

return foo

Both functions are not the same in syntax but they behave exactly the same…

Basically I have and update function in the Parent object that updates all the back end stuff like healthGui, ammoGui, etc. I also want this to update for the child but I want the child to update the back end stuff. I am currently getting around this but creating a serperate function called base_update that the child will never overried and just call base_update from child update