✅ Verified in-game β deeper pass: confirmed the whole 3-line source; clarified UnUse is an engine-invoked un-use callback (not an Event.* subscription), cross-linked the Object namespace, and pruned vacuous Notes boilerplate
Barbell
Module: barbell.lua
Overview
The entire barbell.lua is a single function: when the player stops βusingβ the barbell prop, detach it from whoever was holding it. This is a minimal world-prop script β the barbell is a hold-and-carry object, and this is the one bit of scripted behaviour it needs.
Inheritance
- Inherits from: none β base/utility module
- Imports: none
Instance pattern
Stateless. No module-level tables, no per-uGuid bookkeeping, no setmetatable/tInstance factory β just one global function the engine calls.
Functions
UnUse(objectGuid, holdersGuid)
Calls Object.Detach(holdersGuid, objectGuid) to release the barbell (objectGuid) from its holder (holdersGuid). UnUse is an engine-invoked lifecycle callback fired when the βuseβ interaction ends β it is not an Event.* subscription and is never called from within this file.
Events
- Subscribes to: none.
UnUseis an engine callback, not anEvent.Createlistener.
Notes for modders
- The whole prop reduces to one
Object.Detachcall β see the Object namespace for the attach/detach primitives (Object.Attach/Object.Detach) if you want to build a similar pick-up/put-down prop. - Note the argument order:
Object.Detach(holdersGuid, objectGuid)takes the holder first, then the attached object β the reverse of theUnUse(objectGuid, holdersGuid)parameter order.