Skip to main content

SkillFX

The template class for all skill effects. Skill effects are created by the server and replicated to the client.

Properties

ID

This item is read only and cannot be modified. Read Only
SkillFX.ID: number

The unique ID of the skill effect. Synced between client and server's SkillReplication.ID.

Functions

new

SkillFX.new(UsedByCharacterModel) → ()

Creates a new SkillFX instance.

Start

SkillFX: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.

Run

SkillFX:Run(
RunContext"Client" | "Server",
InputState"Begin" | "End"
) → ()

Called when the skill owner requests to run a skill action. Can be called either from the client or the server. InputState determines whether the action is being started or ended.

Cancel

SkillFX: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": 50,
                "path": "src/ReplicatedStorage/Modules/Skills/SkillFX/Fruits/Client_Template.lua"
            }
        },
        {
            "name": "Run",
            "desc": "Called when the skill owner requests to run a skill action.\nCan be called either from the client or the server. `InputState` determines whether the action is being started or ended.",
            "params": [
                {
                    "name": "RunContext",
                    "desc": "",
                    "lua_type": "\"Client\" | \"Server\""
                },
                {
                    "name": "InputState",
                    "desc": "",
                    "lua_type": "\"Begin\" | \"End\""
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 61,
                "path": "src/ReplicatedStorage/Modules/Skills/SkillFX/Fruits/Client_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": 64,
                "path": "src/ReplicatedStorage/Modules/Skills/SkillFX/Fruits/Client_Template.lua"
            }
        },
        {
            "name": "new",
            "desc": "Creates a new `SkillFX` instance.",
            "params": [
                {
                    "name": "UsedByCharacter",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 69,
                "path": "src/ReplicatedStorage/Modules/Skills/SkillFX/Fruits/Client_Template.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "ID",
            "desc": "The unique ID of the skill effect. Synced between client and server's `SkillReplication.ID`.",
            "lua_type": "number",
            "readonly": true,
            "source": {
                "line": 45,
                "path": "src/ReplicatedStorage/Modules/Skills/SkillFX/Fruits/Client_Template.lua"
            }
        }
    ],
    "types": [],
    "name": "SkillFX",
    "desc": "The template class for all skill effects. Skill effects are created by the server and replicated to the client.",
    "source": {
        "line": 38,
        "path": "src/ReplicatedStorage/Modules/Skills/SkillFX/Fruits/Client_Template.lua"
    }
}