Solved Random TP

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

iCritiqing

Member
Jul 4, 2017
13
0
1
21
Skript Version: Skript 2.2 (dev20c)
Skript Author: Bensku
Minecraft Version: 1.8.9

Hello guys, i'm kinda new to Skript
Can you guys show me how to randomly teleports yourself to another player that doesn't have a specific permission?

Example:
When you rightclick a blaze rod, you automaticly teleports to a random player that doesn't have the permission "skript.isastaff"

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? No
What other methods have you tried to fix it? I have tried to google it but i don't find the perfect one

Thanks :emoji_grinning:
 
You can try with this
code_language.skript:
on right click with blaze rod:
    teleport player to a random element out of all players
 
thanks :emoji_grinning:



But i want it to make the players that have a specific permissions wont be teleported to
code_language.skript:
on right click with blaze rod:
    loop all players:
        if loop-player don't has permission "skript.isastaff":
            add loop-player to {_Random::*}
    if {_Random::*} is set:
        teleport player to random element out of {_Random::*}
    else:
        send "Sorry, there is no player without permission online."
 
code_language.skript:
on right click with blaze rod:
    loop all players:
        if loop-player don't has permission "skript.isastaff":
            add loop-player to {_Random::*}
    if {_Random::*} is set:
        teleport player to random element out of {_Random::*}
    else:
        send "Sorry, there is no player without permission online."
Thanks <3

Edit:
It doesn't teleport me...
and it doesn't send me the "no players without permissions online" message...
There was an error but i fixed it, i only changed the "has" to "have" and the error disapears
but it still doesn't teleports me...
 
Last edited by a moderator:
Thanks <3

Edit:
It doesn't teleport me...
and it doesn't send me the "no players without permissions online" message...
There was an error but i fixed it, i only changed the "has" to "have" and the error disapears
but it still doesn't teleports me...
code_language.skript:
on right click with blaze rod:
    loop all players:
        loop-player doesn't have permission "skript.isastaff":
            add loop-player to {_random::*}
    {_random::*} is set:
        set {_} to random element out of {_random::*} parsed as player
        teleport player to {_}
    else:
        send "Sorry, there is no player without permission online."
 
code_language.skript:
on right click with blaze rod:
    loop all players:
        loop-player doesn't have permission "skript.isastaff":
            add loop-player to {_random::*}
    {_random::*} is set:
        set {_} to random element out of {_random::*} parsed as player
        teleport player to {_}
    else:
        send "Sorry, there is no player without permission online."
Nope still not working D: