How would I turn this Python code into Roblox code:
class Human:
def walk(self):
print("Walk")
class Dog(Human):
def bark(self):
print("Bark")
dog = Dog()
dog.bark()
dog.walk()
How would I turn this Python code into Roblox code:
class Human:
def walk(self):
print("Walk")
class Dog(Human):
def bark(self):
print("Bark")
dog = Dog()
dog.bark()
dog.walk()
Why would you want to do this?
Perhaps this could work @AustnBlox
function walk(hum)
print("Walk")
function bark(dog)
print("Bark")
bark(dog)
walk(hum or dog)
So that I can have two classes which share the same ability.
Example: Humans can walk and a dogs can too, so I want the dog to share the same functions (abilities) like you would use in OOP. So my dog can walk and bark. But my question was how do I convert this into roblox code.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.