sm
The sm namespace contain all API features related to Scrap Mechanic.
Functions
exists
sm.exists( object )
Returns whether an object exists in the game.
This is useful for checking whether a reference to an object is valid.
object
[ any ]: The object to check.
- [ bool ]: Whether the object exists or not.
isServerMode
sm.isServerMode( object )
Returns whether the script is currently running in server mode.
Otherwise, it is running in client mode. Server mode only occurs when sm.isHost is true.
- [ bool ]: Whether the script is running in server mode or not.