RTP skript not working

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

    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.

Kolombooo

Active Member
Dec 3, 2020
51
3
8
Hi. I want to make rtp skript that teleports player in the world survival randomly
Code:
variables:
  {x} = 0
  {y} = 0
  {z} = 0

command /rtp:
  permission: skyland.rtp
  aliases: /rt, /randomteleport, /rteleport, /randomtp, /randomt
  trigger:
    set {x} to random integer between -5000 and 2000
    set {y} to random integer between 100 and 100
    set {z} to random integer between -9000 and 5000
    apply potion of resistance of tier 200 to player for 30 seconds #the long of the potion can be whatever you want, 1 tick, 15 days, a year
    wait 1 second
    teleport player to location at {x} {y} {z} in world "survival"
    wait 30 seconds
It shows this error
Variables cannot be used here. tp.sk: teleport player to location at {x} {y} {z} in world "survival"
 
Status
Not open for further replies.