-2

I'm making this game, and it has items, the thing is, you need to hold one item, do something with it, and then put it back.

I'm trying to prevent people from leaving with the item in their inventory by, if someone leaves with the item, making it respawn. On join the player's inventory resets anyways. But my main concern is, if someone drops it, and another person picks it up, that it might glitch out.

My idea at first was making a scoreboard with a 0 or 1 value, 0 = the person doesn't have the item in their inventory, 1 = they do. But when someone drops it, it respawns, someone picks it up, now you have 2 items, where there should only be one.

Does anyone know how I could potentially fix this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.