Skip to main content

Droplet

Types

Droplet

type Droplet = Droplet

Functions

GetValue

Droplet:GetValue() → any

Fetches the end-user defined value of the droplet.

GetMetadata

Droplet:GetMetadata() → any?

Fetches the metadata for the droplet if any has been given

GetResourceTypeData

Droplet:GetResourceTypeData() → ResourceTypeData

Fetches the resource type data for the droplet.

GetPosition

Droplet:GetPosition() → Vector3

Fetches the position of the droplet.

GetModel

Droplet:GetModel() → Actor

Fetches the main actor model of the droplet.

GetSetupData

Droplet:GetSetupData() → any

Returns the data that was returned by the ResourceTypeData.Setup function

IsTimingOut

Droplet:IsTimingOut() → boolean

Returns whether or not the droplet is in the process of timing out.

GetMagnetizationRadius

Droplet:GetMagnetizationRadius() → number

Returns the magnetization radius for this droplet. This is the distance from a player at which the droplet will begin moving towards them.

IsSettled

Droplet:IsSettled() → boolean

Returns whether or not the droplet has settled (come to a complete stop).

MustSettleBeforeCollect

Droplet:MustSettleBeforeCollect() → boolean

Returns whether this droplet must settle before it can be collected.

Attach

Droplet:Attach(
objectModel | BasePart,--

The object to attach to the droplet.

C0CFrame?,--

Optional C0 for the Weld.

C1CFrame?--

Optional C1 for the Weld.

) → Weld

Welds a Model or Part to the droplet. Use this to add your visuals to the droplet. Provides optional C0 and C1 for the Weld created between the droplet and the object.

Show raw api
{
    "functions": [
        {
            "name": "processRendering",
            "desc": "Called by DropletClientManager",
            "params": [],
            "returns": [],
            "function_type": "static",
            "private": true,
            "source": {
                "line": 138,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "new",
            "desc": "Creates a new Droplet instance. Called by DropletClientManager.",
            "params": [
                {
                    "name": "config",
                    "desc": "The configuration for the droplet.",
                    "lua_type": "{\n    Id: number;\n    NetworkPacket: DropletUtil.DropletNetworkPacket;\n    ResourceTypeData: DropletUtil.ResourceTypeData;\n\n    Value: any?,\n    LifeTime: number,\n\n    DropletClientManager: any,\n}"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Droplet"
                }
            ],
            "function_type": "static",
            "private": true,
            "source": {
                "line": 151,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "GetValue",
            "desc": "Fetches the end-user defined value of the droplet.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 252,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "GetMetadata",
            "desc": "Fetches the metadata for the droplet if any has been given",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any?\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 259,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "GetResourceTypeData",
            "desc": "Fetches the resource type data for the droplet.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ResourceTypeData\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 266,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "GetPosition",
            "desc": "Fetches the position of the droplet.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector3\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 273,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "GetModel",
            "desc": "Fetches the main actor model of the droplet.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Actor\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 280,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "GetSetupData",
            "desc": "Returns the data that was returned by the ResourceTypeData.Setup function",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 288,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "IsTimingOut",
            "desc": "Returns whether or not the droplet is in the process of timing out.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 295,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "GetMagnetizationRadius",
            "desc": "Returns the magnetization radius for this droplet.\nThis is the distance from a player at which the droplet will begin moving towards them.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 303,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "IsSettled",
            "desc": "Returns whether or not the droplet has settled (come to a complete stop).",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 310,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "MustSettleBeforeCollect",
            "desc": "Returns whether this droplet must settle before it can be collected.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 317,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "GetPivot",
            "desc": "Fetches the pivot CFrame of the droplet.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "CFrame\n"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 325,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "Identify",
            "desc": "Returns the seed and id of the droplet. Used for internal identification.",
            "params": [],
            "returns": [
                {
                    "desc": "The seed of the droplet",
                    "lua_type": "number"
                },
                {
                    "desc": "The id of the droplet",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 335,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "Attach",
            "desc": "Welds a Model or Part to the droplet. Use this to add your visuals to the droplet.\nProvides optional C0 and C1 for the Weld created between the droplet and the object.",
            "params": [
                {
                    "name": "object",
                    "desc": "The object to attach to the droplet.",
                    "lua_type": "Model | BasePart"
                },
                {
                    "name": "C0",
                    "desc": "Optional C0 for the Weld.",
                    "lua_type": "CFrame?"
                },
                {
                    "name": "C1",
                    "desc": "Optional C1 for the Weld.",
                    "lua_type": "CFrame?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Weld\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 350,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "Collect",
            "desc": "Collects the droplet for the specified player.\nLets the server know that the player has collected this droplet.\nDestroys the droplet after collection.\nYou should not need to call this manually as it is handled by the DropletClientManager.",
            "params": [
                {
                    "name": "playerWhoCollected",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 392,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "Claim",
            "desc": "Called when a player enters the droplet's collection radius.\nStarts the magnetization process.\nCalled automatically when the server registers that a player has claimed this droplet.",
            "params": [
                {
                    "name": "playerWhoClaimed",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 416,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "Magnetize",
            "desc": "Starts the magnetization process for the droplet.\nCalled automatically when a player enters the droplet's collection radius.",
            "params": [
                {
                    "name": "playerWhoCollected",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 434,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        },
        {
            "name": "_Render",
            "desc": "",
            "params": [
                {
                    "name": "dt",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 543,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "Droplet",
            "desc": "",
            "lua_type": "Droplet",
            "source": {
                "line": 559,
                "path": "lib/dropletmanager/src/Client/Droplet.luau"
            }
        }
    ],
    "name": "Droplet",
    "desc": "",
    "source": {
        "line": 6,
        "path": "lib/dropletmanager/src/Client/Droplet.luau"
    }
}