Page 1 of 1

[2.0.76] Error when writing to LuaPlayer::mining_state

Posted: Thu Apr 02, 2026 1:19 pm
by Cooldude2606
tl;dr No error while reading, but error when attempting to write to LuaPlayer::mining_state when in ghost controller.

When a player is in certain controllers, such as ghost when waiting to respawn, the property "mining_state" is readable but not writable. From the API docs it is not clear what the full criteria for having a "manual miner" are, so it is not possible to check if the property is writable. That first part feels like a doc issue, but I am reporting it as a bug because the different behaviours between readining and writing when there is no "manual miner". Because of the read behaviour, I would expect it to only error when attempting to set mining to true, and for this to be documented; although you may decide it better to error on read and document which check to perform before accessing the property.

Reproduction:

Code: Select all

/c game.player.ticks_to_respawn = 7200
/c game.player.mining_state = { mining = false }

Re: [2.0.76] Error when writing to LuaPlayer::mining_state

Posted: Mon Apr 06, 2026 4:12 pm
by Rseding91
Moving to documentation improvement requests. Manual miner exists for the controller types of:

* Character
* God
* Editor