Solved on inventory open is not detecting the player's inventory

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

Binkie

Member
Nov 20, 2020
21
2
3
16
Hi, i am just asking because when i do this code it doesn't detected if the player open their inventory or not it only detects the player when they open a gui like chest, ender chest, etc...

Here is my code

on inventory open:
wait 10 ticks
set {%player%.inv} to player's location
set {%player%.open} to true

on inventory close:
set {%player%.open} to false

on any move:
if {%player%.open} is true:
teleport player to {%player%.inv}
 
Hi, i am just asking because when i do this code it doesn't detected if the player open their inventory or not it only detects the player when they open a gui like chest, ender chest, etc...

Here is my code

on inventory open:
wait 10 ticks
set {%player%.inv} to player's location
set {%player%.open} to true

on inventory close:
set {%player%.open} to false

on any move:
if {%player%.open} is true:
teleport player to {%player%.inv}

I think your purpose is not understood, try to explain it more clearly.

What does it have to do with the player's movement?
 
Nvm i know how to fix i should have used the on packet event sorry for disturbing yall :emoji_wink:
 
Status
Not open for further replies.