Get Items

  • 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.

MrVlamis

Member
Apr 27, 2022
11
0
1
19
every 5 second:
loop all players:
if block below loop-player is barrier:
set {_item} to a random item out of all items
wait 1 tick
if {_item} is respawn anchor:
stop
else:
give {_item} to loop-player
stop


why only 2 player get Items the other player get nothing?
 
every 5 second:
loop all players:
if block below loop-player is barrier:
set {_item} to a random item out of all items
wait 1 tick
if {_item} is respawn anchor:
stop
else:
give {_item} to loop-player
stop


why only 2 player get Items the other player get nothing?
you are using a local variable and its also not a list
you have to do {items::*}
Code:
command /test:
    trigger:
        give a random element out of {items::*} to the player

command /add:
    trigger:
        add player's held item to {items::*}
 
Status
Not open for further replies.