Solved Right click whilst sneaking

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

Cooleeo

Member
Apr 18, 2018
17
1
0
24
so, i'm trying to create an effect when a player right clicks whilst sneaking. the code that i have only executes if a player right clicks a block when sneaking. how can i make it so the effect executes when a player right clicks in general whilst sneaking?

code_language.skript:
on rightclick:
    if player is sneaking:
        message "test"

thanks in advance
 
code_language.skript:
on right click on stone:
    if player is sneaking:
        send "yay"
code_language.skript:
on right click:
    if player is holding stick:
        if player is sneaking:
            send "yay"
 
code_language.skript:
on right click on stone:
    if player is sneaking:
        send "yay"
code_language.skript:
on right click:
    if player is holding stick:
        if player is sneaking:
            send "yay"

sorry I must have not worded that correctly, I'm looking for an event where a player is sneaking and right-clicks in general, as in, like in the air, not necessarily on blocks or with an item held.
 
ehm
code_language.skript:
every 5 seconds:
    loop all players:
        loop-player is sneaking:
            send "yay" to loop-player
for what mini-game or server?
 
ehm
code_language.skript:
every 5 seconds:
    loop all players:
        loop-player is sneaking:
            send "yay" to loop-player
I wanted to create a menu that opens up when a player right clicks whilst sneaking, as it would be quick access and wouldn't take up space in the hotbar. I just need the event, if its possible
 
code_language.skript:
on rightclick:
    if player is sneaking:
        open chest with 5 rows named "yay2" to player
        send "yay"
 
I didn’t know this until every recently, but I just read that when a player right clicks on air, that the client does not send that info to the server.
So from my understanding it’s not possible
 
Maybe it was something about Skript I read then, or maybe whatever i read was wrong and I was LIED TO... damn them,,, DAMN THEM!
But come to think of it youre right.... I think it does register it, because i remember helping someone out and I did my on click event with a potato in my hand, and i was clicking air, and it registered.
 
wait no actually i was wrong it doesnt trigger at all for rightclicking air
 
Status
Not open for further replies.