Help

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

dfsdfas

New Member
Jul 22, 2020
7
0
1
24
I want to check if the player making the right Is in spectator mode, but when I put player executing right click it’s making me an error, I’m making a Skript that allows spectator see survival players inventory on right click them


Code:
on right click on a player:
    if event-player's gamemode is spectator:
        set {_Chest} to player's inventory
        add helmet of player to {_Chest}
        add chestplate of player to {_Chest}
        add leggings of player to {_Chest}
        add boots of player to {_Chest}
        show chest inventory with 5 rows named "&7»&ePlayer Inventory&7»" to player
        set the inventory of chest named "&7»&ePlayer Inventory&7»" to {_Chest}
 
Last edited:
Code:
on right click on a player:
    if player's gamemode is spectator:
        set {_Chest} to the player inventory
        add helmet of player to {_Chest}
        add chestplate of player to {_Chest}
        add leggings of player to {_Chest}
        add boots of player to {_Chest}
        add off hand of player to {_Chest}
        open chest with 5 rows named "&7»&ePlayer Inventory&7»" to player
        set the inventory of chest named "&7»&ePlayer Inventory&7»" to {_Chest}
 
Code:
on right click on a player:
    if player's gamemode is spectator:
        set {_Chest} to the player inventory
        add helmet of player to {_Chest}
        add chestplate of player to {_Chest}
        add leggings of player to {_Chest}
        add boots of player to {_Chest}
        add off hand of player to {_Chest}
        open chest with 5 rows named "&7»&ePlayer Inventory&7»" to player
        set the inventory of chest named "&7»&ePlayer Inventory&7»" to {_Chest}
this works, but now I have another problem

Error:
Code:
chest named "&7»&ePlayer Inventory&7»" is not an inventory holder (invsee.sk, line 9: set the inventory of chest named "&7»&ePlayer Inventory&7»" to {_Chest}')
 
Status
Not open for further replies.