Selected hotbar slot

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ThePraZ

Member
Feb 20, 2017
37
1
8
Hello, I have a problem with the set current hotbar slot of player to 0, the problem is that it doesn't works and in reload its says that the hotbar slot of player can't be set to 0 because the latter is not an slot
 
use correct syntax
For get any hotbar slot of player inventory
slot %number% of player's inventory
where %number% is 0 - 8

Or get current hotbar slot:
hotbar slot of player

And you cannot set it to 0, only first expression can be set to some %itemtype%, like:
Code:
set {_slot} to hotbar slot of player
set slot {_slot} of player to (dirt named "someitem")
If you wanna change only hotbar slot use:
Code:
set player's held item to (dirt named "someitem")
 
Status
Not open for further replies.