Control:Destroy
Destroys a control and its children.
Syntax
Signature
Control:Destroy() -> ()Aliases
Control:Remove
Parameters
This function takes no parameters.
Returns
| Type | Description |
|---|---|
() | None. |
Notes
Calling it again has no effect. Later property writes raise an error.
Example
Luau
local Box = Drawing.create("TextBox", {Text = "Hello"})
Box:Destroy()