Jump to content
  • 0

Command to teleport players to a random location?


zCrxtix
 Share

Question

4 answers to this question

Recommended Posts

  • 0

This should work ( untested )

command /randomtp:
    trigger:
        set {_x} to random number between -500 and 500
        set {_z} to random number between -500 and 500
        set {_loc} to highest block at location ({_x}, 0, {_z})
        teleport player to block above {_loc}
        send "&aYou've been teleported randomly!"

⚠️Important Note - If you will be having many more players on your server, teleporting to locations where chunks are not generated, can sometimes cause performance issues (where this command can be abused). Would recommend turning down the random location range, or pre-generating chunks.

 

Also, next time, try going under Script Releases, or Marketplace to request skripts.

Also, remember that there are many other people who already have made/asked about skript on other forum engines.

Make sure to google it, and you will get what you want within seconds! Good day.

Edited by CoolProgrammer

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

Link to comment
Share on other sites

  • 0

Wouldn't this make it so it will teleport players in the ground and suffocate them @CoolProgrammer? I might try and have a go at improving this so it accounts for that and teleports them to a safe location.

Edited by 83y

Youtube: https://www.youtube.com/c/83y123

Discord: 83y#2552

IGN: 83y

 

If your seeing this I am currently banned from Posting, the Discord and GitHub

I have helped out countless player's and been re-payed with multiple bans.

staff are attention seeking and biased, i'd just leave for your sake.

your just wasting your time.

like.gif

Link to comment
Share on other sites

  • 0
20 hours ago, 83y said:

Wouldn't this make it so it will teleport players in the ground and suffocate them @CoolProgrammer? I might try and have a go at improving this so it accounts for that and teleports them to a safe location.

Forgot to get the highest block at x, z.

Sorry. 😛

I edited the post.

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

Link to comment
Share on other sites

  • 0

Spreadplayers is a vanilla command. View [this] tutorial.

Founder - Minehut.xyz

The leading Minehut support website. We aim to provide top quality tutorials, provide answers to top questions, and help in any way we can. Our site is community driven, and we will continue to make it better and better.

Support | 28/08/20 -13/09/20

Senior Support | 13/09/20 - 19/10/20

 

forums.gif.5d3db2db4a05c9465b84fa9bf0293df4.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share



×
×
  • Create New...