TeleportService:Teleport(placeId, player) - arg `player` is the `Player` class, it can be taken from Players. local placeId = 0 - Insert here, THIS IS NOT STRING, this is int I am still somewhat inexperienced in Lua so I don’t know if that’s the case, but I find it kind of concerning that the brackets surrounds Player. I’ve seen that you put quotes around Place ID making it a string. Using this simple method would probably work better and take the weigh off your shoulder. While it does say that it’s a method to teleport a player, it should be used for teleporting a group of players. ![]() This function serves as the all-encompassing method to teleport a player or group of players from one server to another. You see, TeleportAsync according to documentation reads I know you stated that your current teleport script works before, but I believe it’s not done in the intended way. Now server sided script from main game: would rather use teleportService:Teleport() instead. Tps:TeleportToPrivateServer(0, server, plrs, nil, data) -also replace 0 to the place id where players are teleporting Table.insert(plrs, plr) -adding this player to the player list Lobby: local server = tps:ReserveServer(0) -replace 0 to the place id where players are teleporting toįor i, plr in ipairs(game.Players:GetChildren()) do -getting every player on the server Who don’t know, we need to use as a TeleportData a table, and then in the other place we need to use PlayerAdded function and do player:GetJoinData() on the server sided script. This separation creates the best player experience as you’ll soon learn. You can create a massive world by separating them into separate places. ![]() I forgot to say, that i’m using teleport service to teleport players to private server. Posted on NovemPosted in roblox Learning how to teleport in Roblox scripting is great for those with large game worlds.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |