GetComponent
7/14/25Less than 1 minute
SDKGrab.GetComponent(TComponent type)
Returns the component of Type type if the game object has one attached, nil if it doesn't.
Parameters:
| Name | Type | Description | 
|---|---|---|
| type | TComponent | The type of Component to retrieve. | 
Returns:
| type | Description | 
|---|---|
| TComponent | the component of Type type | 
Usage
---@type SDKGrab
local sdkgrab;
---@type TComponent
local type;
local val0 = sdkgrab.GetComponent(type)Example
local transform = myComponent.GetComponent(Transform);
