Skip to main content

Axis

The global axis module, contains everthing axis has to offer.

Properties

Promise

This item is read only and cannot be modified. Read Only
Axis.Promise: Promise

External promise library

ServerConfigs

This item only works when running on the server. ServerThis item is read only and cannot be modified. Read Only
Axis.ServerConfigs: {PlayerConfigPlayerConfig}

Contains all the configs

Player

This item only works when running on the client. ClientThis item is read only and cannot be modified. Read Only
Axis.Player: Player

Functions

GetModule

Axis.GetModule(Namestring) → Module

Returns the module with that name

CreateModule

This item only works when running on the server. Server
Axis.CreateModule(ModuleDefModuleDefinition) → Module

Returns a table to use for the module. This table contains some axis-related stuff

local MyModule = Axis.CreateModule {
    Name = "MyModule";
    Client = {};
}

function MyModule:Init()
    print("Init")
end

function MyModule:Start()
    print("Start")
end

return MyModule

CreateSignal

Axis.CreateSignal() → SIGNAL_MARKER

Creates a marker that will turn the key into a remote signal once Axis is booted

local MyModule = Axis.CreateModule {
    Name = "MyModule";
    Client = {
        -- Create the signal marker, which will turn into a
        -- RemoteSignal when Axis:Boot() is called:
        MySignal = Axis.CreateSignal();
    };
}

CreateUnreliableSignal

Axis.CreateUnreliableSignal() → UNRELIABLE_SIGNAL_MARKER

Creates a marker that will turn the key into a unreliable remote signal once Axis is booted.

Unreliable Events

Internally, this uses UnreliableRemoteEvents, which allows for network communication that is unreliable and unordered. This is useful for events that are not crucial for gameplay, since the delivery of the events may occur out of order or not at all.

See the documentation for UnreliableRemoteEvents for more info.

CreateProperty

Axis.CreateProperty(InitialValueany) → PROPERTY_MARKER

Returns a marker that will turn the key into a remote property one Axis is booted. An initial value can be passed.

RemoteProperties are great for replicating data to all of the clients. Different data can also be set per client.

local MyModule = Axis.CreateModule {
    Name = "MyModule",
    Client = {
        -- Create the property marker, which will turn into a
        -- RemoteProperty when Axis:Boot() is called:
        MyProperty = Axis.CreateProperty("HelloWorld");
    },
}

CreateController

This item only works when running on the client. Client
Axis.CreateController(ControllerDefTypes.ControllerDefinition) → Controller

Wrapper function for controller system function

local MyController = Axis.CreateController {
    Name = "MyController";
}

function MyController:Init()
    print("Init")
end

function MyController:Start()
    print("Start")
end

return MyController

GetController

This item only works when running on the client. Client
Axis.GetController(Namestring) → Controller

Wrapper function for controller system

AddModule

This item only works when running on the server. Server
Axis:AddModule(PathToModuleModuleScript) → ()

Wrapper function for module system function

AddModules

This item only works when running on the server. Server
Axis:AddModules(ParentFolder) → ()

Adds the modules within the parent.

caution

This only adds children, use AddModulesDeep to add descendants

AddModulesDeep

This item only works when running on the server. Server
Axis:AddModulesDeep(ParentFolder) → ()

Adds any modules within the parent folder, this includes in sub-folders

AddController

This item only works when running on the client. Client
Axis:AddController(ControllerScriptModuleScript) → ()

Wrapper function for controller system function

AddControllers

This item only works when running on the client. Client
Axis:AddControllers(ParentFolder) → ()

Adds the controllers within the parent.

caution

This only adds children, use AddControllersDeep to add descendants

AddControllersDeep

This item only works when running on the client. Client
Axis:AddControllersDeep(ParentFolder) → ()

Adds any controllers within the parent folder, this includes in sub-folders

Boot

Axis:Boot() → boolean--

Was boot successful

Start core systems and initialize all core modules

Show raw api
{
    "functions": [
        {
            "name": "GetModule",
            "desc": "Returns the module with that name",
            "params": [
                {
                    "name": "Name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Module"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 32,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "AddModule",
            "desc": "Wrapper function for module system function\n\n    ",
            "params": [
                {
                    "name": "PathToModule",
                    "desc": "",
                    "lua_type": "ModuleScript"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 70,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "AddModules",
            "desc": "Adds the modules within the parent.\n\n\n:::caution\nThis only adds children, use AddModulesDeep to add descendants\n:::\n    ",
            "params": [
                {
                    "name": "Parent",
                    "desc": "",
                    "lua_type": "Folder"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 84,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "AddModulesDeep",
            "desc": "Adds any modules within the parent folder, this includes in sub-folders\n\n    ",
            "params": [
                {
                    "name": "Parent",
                    "desc": "",
                    "lua_type": "Folder"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 97,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "CreateModule",
            "desc": "Returns a table to use for the module. This table contains some axis-related stuff\n\n```lua\nlocal MyModule = Axis.CreateModule {\n    Name = \"MyModule\";\n    Client = {};\n}\n\nfunction MyModule:Init()\n    print(\"Init\")\nend\n\nfunction MyModule:Start()\n    print(\"Start\")\nend\n\nreturn MyModule\n```\n\n\n    ",
            "params": [
                {
                    "name": "ModuleDef",
                    "desc": "",
                    "lua_type": "ModuleDefinition"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Module"
                }
            ],
            "function_type": "static",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 129,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "CreateSignal",
            "desc": "Creates a marker that will turn the key into a remote signal once Axis\nis booted\n\n```lua\nlocal MyModule = Axis.CreateModule {\n    Name = \"MyModule\";\n    Client = {\n        -- Create the signal marker, which will turn into a\n        -- RemoteSignal when Axis:Boot() is called:\n        MySignal = Axis.CreateSignal();\n    };\n}\n```\n    ",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "SIGNAL_MARKER"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 150,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "CreateUnreliableSignal",
            "desc": "Creates a marker that will turn the key into a unreliable remote signal\nonce Axis is booted.\n\n:::warning Unreliable Events\nInternally, this uses UnreliableRemoteEvents, which allows for\nnetwork communication that is unreliable and unordered. This is\nuseful for events that are not crucial for gameplay, since the\ndelivery of the events may occur out of order or not at all.\n\nSee  the documentation for [UnreliableRemoteEvents](https://create.roblox.com/docs/reference/engine/classes/UnreliableRemoteEvent)\nfor more info.\n:::\n    ",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "UNRELIABLE_SIGNAL_MARKER"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 170,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "CreateProperty",
            "desc": "Returns a marker that will turn the key into a remote property\none Axis is booted. An initial value can be passed.\n\nRemoteProperties are great for replicating data to all of\nthe clients. Different data can also be set per client.\n\n```lua\nlocal MyModule = Axis.CreateModule {\n    Name = \"MyModule\",\n    Client = {\n        -- Create the property marker, which will turn into a\n        -- RemoteProperty when Axis:Boot() is called:\n        MyProperty = Axis.CreateProperty(\"HelloWorld\");\n    },\n}\n```\n    ",
            "params": [
                {
                    "name": "InitialValue",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "PROPERTY_MARKER"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 193,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "AddController",
            "desc": "Wrapper function for controller system function\n    ",
            "params": [
                {
                    "name": "ControllerScript",
                    "desc": "",
                    "lua_type": "ModuleScript"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 220,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "AddControllers",
            "desc": "Adds the controllers within the parent.\n\n\n:::caution\nThis only adds children, use AddControllersDeep to add descendants\n:::\n    ",
            "params": [
                {
                    "name": "Parent",
                    "desc": "",
                    "lua_type": "Folder"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 234,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "AddControllersDeep",
            "desc": "Adds any controllers within the parent folder, this includes in sub-folders\n\n    ",
            "params": [
                {
                    "name": "Parent",
                    "desc": "",
                    "lua_type": "Folder"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 247,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "CreateController",
            "desc": "Wrapper function for controller system function\n\n```lua\nlocal MyController = Axis.CreateController {\n    Name = \"MyController\";\n}\n\nfunction MyController:Init()\n    print(\"Init\")\nend\n\nfunction MyController:Start()\n    print(\"Start\")\nend\n\nreturn MyController\n```\n    ",
            "params": [
                {
                    "name": "ControllerDef",
                    "desc": "",
                    "lua_type": "Types.ControllerDefinition"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Controller"
                }
            ],
            "function_type": "static",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 275,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "GetController",
            "desc": "Wrapper function for controller system\n    ",
            "params": [
                {
                    "name": "Name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Controller"
                }
            ],
            "function_type": "static",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 284,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "Boot",
            "desc": "Start core systems and initialize all core modules",
            "params": [],
            "returns": [
                {
                    "desc": "Was boot successful",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 293,
                "path": "Axis/Axis.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "Promise",
            "desc": "External promise library",
            "lua_type": "Promise",
            "readonly": true,
            "source": {
                "line": 19,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "Bootstrap",
            "desc": "",
            "lua_type": "Bootstrap",
            "private": true,
            "source": {
                "line": 26,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "ServerConfigs",
            "desc": "Contains all the configs\n    ",
            "lua_type": "{PlayerConfig: PlayerConfig}",
            "realm": [
                "Server"
            ],
            "readonly": true,
            "source": {
                "line": 49,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "ModuleSystem",
            "desc": "    ",
            "lua_type": "ModuleSystem",
            "realm": [
                "Server"
            ],
            "private": true,
            "readonly": true,
            "source": {
                "line": 59,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "Player",
            "desc": "    ",
            "lua_type": "Player",
            "realm": [
                "Client"
            ],
            "readonly": true,
            "source": {
                "line": 205,
                "path": "Axis/Axis.luau"
            }
        },
        {
            "name": "ControllerSystem",
            "desc": "    ",
            "lua_type": "ControllerSystem",
            "realm": [
                "Client"
            ],
            "private": true,
            "readonly": true,
            "source": {
                "line": 214,
                "path": "Axis/Axis.luau"
            }
        }
    ],
    "types": [],
    "name": "Axis",
    "desc": "The global axis module, contains everthing axis has to offer.",
    "source": {
        "line": 8,
        "path": "Axis/Axis.luau"
    }
}