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

A Question about Teleport Service?

Asked by 8 years ago

There are 5 players in the game. Can you teleport them all in other place like other game? The place that they are going to is already hooked up to the main game so don't worry about that.

1 answer

Log in to vote
1
Answered by
Wutras 294 Moderation Voter
8 years ago

Yes, it is possible. And it's even really easy. I'll show you a script for the understanding and also explain you other possibilities. You may as well create a DataStore to find players who are currently ingame and allow their friends or whoever to follow them into their server. A server's id can be found with game.PlaceId and could be saved using the player's username or userid.

gameid = 0000000

function TeleportAllPlayers()
    for _, plr in pairs(game.Players:GetPlayers()) do
        game:GetService("TeleportService"):Teleport(plr, gameid)
    end
end
TeleportAllPlayers()
0
:D THANK YOU SO MUCH ninjax1234x 20 — 8y
0
No problem. ;) Wutras 294 — 8y
Ad

Answer this question