Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How does the ':place' command work on different admins? [closed]

Asked by 5 years ago

Currently I am trying to make a gui that asks for a place ID, and when entered places all players into that game. I'm fairly new to scripting so I'm not exactly sure how to do this. Any sort of tip helps. Thanks.

Closed as Not Constructive by hiimgoodpack and firestarroblox123

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

This might work. I'm not sure how to create a text field gui, so here is how to teleport with a chat message. The player types in the ID of the place they would like everyone to be teleported to.

game.Players.PlayerAdded:Connect(function(player)
  player.Chatted:Connect(function(msg)
    Players = game:GetService("Players")
    players = Players:GetPlayers()
        print("Teleport")
            game:GetService("TeleportService"):Teleport(players, msg) --teleport
    end
  end)
end)

If only a specific player is supposed to be able to perform this, put an if statement in the code above. I recommend you use a variable of the name of the player that is allowed to do this, or use teams to your advantage. Feel free to use whatever works for you.

PLEASE note that you cannot be teleported to places within Roblox Studio, so don't be alarmed when you get an error in the output. The game must be published and tested for real.

This is written from my head, so there may be an error, but it will be easy to fix considering there is quite a bit of documentation about TeleportService.

If this does not work for you, please comment so that I can make something that works better for you.

Merry Christmas! :D

0
Yep, this is the way to do it. firestarroblox123 440 — 5y
0
Thanks -- trying this out right now. Rxplicate 2 — 5y
Ad