Hi, I'm making a hat system where a player will right-click on an item and that item will then get removed from the players tool slot and be set to their head slot.
I've got that part working just fine but my issue is, how would I be able to set a new hat on the player If they already have a hat on and return the current hat back to their inventory.
So, I need help with
Removing the head slot item and placing it in the inventory.
Here is my current code:
I've got that part working just fine but my issue is, how would I be able to set a new hat on the player If they already have a hat on and return the current hat back to their inventory.
So, I need help with
Removing the head slot item and placing it in the inventory.
Here is my current code:
Code:
on right click holding diamond sword:
name of player's held item contains "Hat":
if player's helmet is not air:
# Code here
stop
else:
set player's helmet to player's tool
remove player's tool from player's inventory