on rightclick on diamond block:

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

masonismediocre

New Member
Apr 1, 2020
5
0
1
20
So I have made this skript that teleports a player to a random level when they right click on a diamond block, but it only works with players who are op, and normal players cannot right click the diamond blocks.

on rightclick on diamond block:
if player is holding air:
set {map} to random element of {maps::*}
send "&b&lB&7&lv&a&l2 &8| &eYour map is: &6&l%{map}%&e!"
teleport player to {pos::%{map}%}

ty :emoji_slight_smile:
 
So I have made this skript that teleports a player to a random level when they right click on a diamond block, but it only works with players who are op, and normal players cannot right click the diamond blocks.

on rightclick on diamond block:
if player is holding air:
set {map} to random element of {maps::*}
send "&b&lB&7&lv&a&l2 &8| &eYour map is: &6&l%{map}%&e!"
teleport player to {pos::%{map}%}

ty :emoji_slight_smile:
Let's see if I understood: do you want only players with op permissions to be able to execute this entire chain of codes by right-clicking on a diamond block? If this is that you want:

code_language.skript:
on rightclick on diamond block:
    if player is holding air:
        if player is op:
            set {map} to random element of {maps::*}
            send "&b&lB&7&lv&a&l2 &8| &eYour map is: &6&l%{map}%&e!"
            teleport player to {pos::%{map}%}
        else:
            send "&cNo permissions."
 
Sorry for being unclear- I want all players to be able to use the diamond block, but it only works for players who are op.
 
Status
Not open for further replies.