Skip to content

is inheritence possible? #679

@SDFTDusername

Description

@SDFTDusername

i was wondering if it is possible to have userdata that inherits another userdata with the luau feature.
i've already tried setting __index to return the super class. i also tried returning the metatable of the super, though i wasn't able to due to the metatable being wrapped around UserDataMetatable.

my goal is to have two types named Instance and WorldInstance, where Instance has a field named Name and WorldInstance has a field named Position. the user would then be able to access the Name field from an instance of WorldInstance. would that be possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions