The two problems about networking, and type-checking on Basic Object Oriented Programming Module

Before starting, I’ve been working a basic class module.

But, I have two concerns with this module.

First, I’m concerning about how to make a remote connection between the server-side, and client-side classes, which the server side controls and the client side responds to the server’s request.

Second, I want to make type-checking like the following one

local Class = require(path.to.module)
local NewClass = Class:create("new")

function returnNewObj(): NewClass (or new)
    local newObj = NewClass()
    return newObj
end

As shown above, I want to make a type automatically assigned to the class variable or given class name.

If you have any answers to one of them, Please reply to my post.