1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Randomspawn

Discussion in 'Skript' started by Ter2FIc, Jul 30, 2021.

Thread Status:
Not open for further replies.
  1. Ter2FIc

    Ter2FIc Member

    Joined:
    Dec 30, 2020
    Messages:
    20
    Likes Received:
    0
    Trying to make random spawn, but failed. My worldborder is 1500, 1500~ -1500, 1500
    Code (Text):
    1. on first join:
    2.     set {spawn.%player%} to random number between 1 to 8
    3.     if {spawn.%player%} = 1:
    4.         teleport player to -217 64 -193
    5.         set player's spawnpoint to player's location
    6.     if {spawn.%player%} = 2:
    7.         teleport player to -132 69 -129
    8.         set player's spawnpoint to player's location
    9.     if {spawn.%player%} = 3:
    10.         teleport player to 302 65 -310
    11.         set player's spawnpoint to player's location
    12.     if {spawn.%player%} = 4:
    13.         teleport player to 498 85 -522
    14.         set player's spawnpoint to player's location
    15.     if {spawn.%player%} = 5:
    16.         teleport player to -1 78 -786
    17.         set player's spawnpoint to player's location
    18.     if {spawn.%player%} = 6:
    19.         teleport player to -271 89 -723
    20.         set player's spawnpoint to player's location
    21.     if {spawn.%player%} = 7:
    22.         teleport player to -516 88 -402
    23.         set player's spawnpoint to player's location
    24.     if {spawn.%player%} = 8:
    25.         teleport player to -895 69 -245
    26.         set player's spawnpoint to player's location
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    random number can be: 1.6, 0.5, 4.5, ...
    random integer can be: 1, 2, 3, 4, ...

    so your solution would be to use random integer instead of random number
     
Thread Status:
Not open for further replies.

Share This Page

Loading...