Skip to main content

Skill

The template class for all skills. Skills can be created by players and NPCs.

Functions

new

Skill.new(CharacterModel) → ()

Creates a new Skill instance.

Start

Skill:Start() → ()

Called when the skill is initialized. Any setup should be done here.

Errors

TypeDescription
"Attempted to yield inside Start function!"Thrown if the function yields.

OnStateUpdate

Skill:OnStateUpdate(
Actionstring,
...any
) → ()

Called when the skill owner requests to run a skill action.

Run

Skill:Run(
MouseHitCFrame,
InputState"Begin" | "End"
) → ()

Called when the skill owner's input state changes.

Cancel

Skill:Cancel() → ()

Called when the skill is about to be destroyed. Any cleanup should be done here.

Show raw api
{
    "functions": [
        {
            "name": "Start",
            "desc": "Called when the skill is initialized. Any setup should be done here.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "errors": [
                {
                    "lua_type": "\"Attempted to yield inside Start function!\"",
                    "desc": "Thrown if the function yields."
                }
            ],
            "source": {
                "line": 28,
                "path": "src/ServerStorage/Modules/Skills/SkillModule/Fruits/Server_Template.lua"
            }
        },
        {
            "name": "OnStateUpdate",
            "desc": "Called when the skill owner requests to run a skill action.",
            "params": [
                {
                    "name": "Action",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 31,
                "path": "src/ServerStorage/Modules/Skills/SkillModule/Fruits/Server_Template.lua"
            }
        },
        {
            "name": "Run",
            "desc": "Called when the skill owner's input state changes.",
            "params": [
                {
                    "name": "MouseHit",
                    "desc": "",
                    "lua_type": "CFrame"
                },
                {
                    "name": "InputState",
                    "desc": "",
                    "lua_type": "\"Begin\" | \"End\""
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 34,
                "path": "src/ServerStorage/Modules/Skills/SkillModule/Fruits/Server_Template.lua"
            }
        },
        {
            "name": "Cancel",
            "desc": "Called when the skill is about to be destroyed. Any cleanup should be done here.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 37,
                "path": "src/ServerStorage/Modules/Skills/SkillModule/Fruits/Server_Template.lua"
            }
        },
        {
            "name": "new",
            "desc": "Creates a new `Skill` instance.",
            "params": [
                {
                    "name": "Character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 47,
                "path": "src/ServerStorage/Modules/Skills/SkillModule/Fruits/Server_Template.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Skill",
    "desc": "The template class for all skills. Skills can be created by players and NPCs.",
    "source": {
        "line": 21,
        "path": "src/ServerStorage/Modules/Skills/SkillModule/Fruits/Server_Template.lua"
    }
}