Skip to main content

ModelTransparencyEffect

This item only works when running on the client. Client

Allows a model to have transparent set locally on the client

Functions

new

ModelTransparencyEffect.new(
serviceBagServiceBag,
adorneeInstance,
transparencyServiceMethodName"SetTransparency" | "SetLocalTransparencyModifier" | nil
) → ModelTransparencyEffect

SetAcceleration

ModelTransparencyEffect:SetAcceleration(accelerationnumber) → ()

Sets the acceleration

SetTransparency

ModelTransparencyEffect:SetTransparency(
transparencynumber,
doNotAnimateboolean
) → ()

Sets the transparency

IsDoneAnimating

ModelTransparencyEffect:IsDoneAnimating() → boolean

Returns true if animation is done

FinishTransparencyAnimation

ModelTransparencyEffect:FinishTransparencyAnimation(callbackfunction) → ()

Finishes the transparency animation, and then calls the callback to finish the animation.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "",
            "params": [
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag"
                },
                {
                    "name": "adornee",
                    "desc": "",
                    "lua_type": "Instance"
                },
                {
                    "name": "transparencyServiceMethodName",
                    "desc": "",
                    "lua_type": "\"SetTransparency\" | \"SetLocalTransparencyModifier\" | nil"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ModelTransparencyEffect"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "src/modeltransparencyeffect/src/Client/ModelTransparencyEffect.lua"
            }
        },
        {
            "name": "SetAcceleration",
            "desc": "Sets the acceleration",
            "params": [
                {
                    "name": "acceleration",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 47,
                "path": "src/modeltransparencyeffect/src/Client/ModelTransparencyEffect.lua"
            }
        },
        {
            "name": "SetTransparency",
            "desc": "Sets the transparency",
            "params": [
                {
                    "name": "transparency",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "doNotAnimate",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 56,
                "path": "src/modeltransparencyeffect/src/Client/ModelTransparencyEffect.lua"
            }
        },
        {
            "name": "IsDoneAnimating",
            "desc": "Returns true if animation is done",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 73,
                "path": "src/modeltransparencyeffect/src/Client/ModelTransparencyEffect.lua"
            }
        },
        {
            "name": "FinishTransparencyAnimation",
            "desc": "Finishes the transparency animation, and then calls the callback to\nfinish the animation.",
            "params": [
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "function"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 82,
                "path": "src/modeltransparencyeffect/src/Client/ModelTransparencyEffect.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "ModelTransparencyEffect",
    "desc": "Allows a model to have transparent set locally on the client",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 7,
        "path": "src/modeltransparencyeffect/src/Client/ModelTransparencyEffect.lua"
    }
}