Skip to main content

AnimationModelModule

Functions

createFromInstance

AnimationModelModule.createFromInstance(instanceInstance) → Result

Creates an AnimationModel from an Instance. Returns a Result.

  • Instance must have an Attribute named ModelType which must be a string!!

Valid ModelTypes

Name ClassName
Model CFramedModel
CFramedTrain CFramedTrainModel
Hinged HingedModel

isInstance

AnimationModelModule.isInstance(instanceInstance) → Result<boolean,string>

Checks if Instance contains a StringValue named "TrackClass"

Show raw api
{
    "functions": [
        {
            "name": "createFromInstance",
            "desc": "Creates an AnimationModel from an Instance.\nReturns a Result.\n- Instance must have an Attribute named `ModelType` which must be a string!!\n#### Valid ModelTypes\n| Name | ClassName |\n| ---------- | -------- |\n| `Model` | [CFramedModel](/api/CFramedModel) |\n| `CFramedTrain` | [CFramedTrainModel](/api/CFramedTrainModel) |\n| `Hinged` | [HingedModel](/api/HingedModel) |",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Result"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 55,
                "path": "src/shared/animationModel/init.lua"
            }
        },
        {
            "name": "isInstance",
            "desc": "Checks if Instance contains a StringValue named \"TrackClass\"",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Result<boolean, string>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 84,
                "path": "src/shared/animationModel/init.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "AnimationModelModule",
    "desc": "",
    "source": {
        "line": 23,
        "path": "src/shared/animationModel/init.lua"
    }
}