| Argument | Data Type | Needed | Default | Description |
|---|---|---|---|---|
model | string | ✅ | - | The keyhanger model (key) defined in Config.KeyHangers |
coords | vector3 | ✅ | - | The coordinates where the keyhanger will be placed |
rotation | vector3 | ❌ | vector3(0.0, 0.0, 0.0) | The rotation of the keyhanger |
fromItem | boolean | ❌ | false | If true the keyhanger can be picked up by players and given back as an item |
Returns
Returns
| Type | Description |
|---|---|
| boolean | true if the keyhanger has been created, false otherwise |
| number | string | The id of the created keyhanger, or the error message if the keyhanger has not been created (Invalid keyhanger data if the model does not exist) |
Example
Example