Using Minecraft command blocks to automatically TP players when they join?
I am trying to make a Hunger Games map on MC 1.5.2 and I am almost finished. I have most of the command blocks set ready for the games but for some reason, everyone keeps spawning on top the glass sphere and not in the lobby I made. Even after I changed the spawnpoint and did /kill, I still spawned on top of the sphere so to counteract that, I made a TP command block which TPs all people to the lobby. Though what I want is something that can TP each person to the lobby when they join, automatically, so that they don't spawn on top the sphere without them being able to get to the lobby and having me to manually press the TP all to lobby button.
So, any suggestions on how I can make an Auto-TP when people join my server?
Best Answer
To make them automatically teleport down to where you want them you can use the /execute command. If you type this:
/execute @a[r=2] ~ ~ ~ tp @p (coordinates of where you want them to spawn go here)
into a repeat/purple command block that is set to always active and that is within two blocks of where the players spawn then it should work. It worked for me when I had the same problem, but if you play Java it might not work because I play Bedrock.
Pictures about "Using Minecraft command blocks to automatically TP players when they join?"
How do you teleport players using command blocks?
Type this command in when having the command block GUI open /teleport @p <x> <y> <z> . Then, activate the command block with redstone (including buttons, levers, and pressure plates), and they will be sent to their destination. The player can set up multiple different teleports.How do you run a command when a player joins Minecraft?
If you only want it to run the command the first time they join, try this:How do you allow all players to teleport in Minecraft?
What to KnowWelcome Message on Login - Minecraft Command Block Tutorial [1.14+]
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Anete Lusina, Pixabay, Sora Shimazaki, Vanessa Loring