Hello, I am trying to make a party teleporter thing. Currently, it puts the player's name into a folder with a String Value. Sadly, I couldn't seem to get it work, any help is appreciated. Here is my current script;
local Players = game:GetService("Players") local TeleportService = game:GetService("TeleportService") local children = script.Parent.Folder:GetChildren() for i = 1, #children do local child = children[i] end TeleportService:TeleportPartyAsync(000000000, children)
The second argument of :TeleportPartyAsync()
involves the player objects, not their names. You said the objects inside the folder are StringValue
s, with values of each player's name. The problem is that these are not player objects. To get the player objects, for example, you could run game.Players:GetPlayers()
. I assume you do not want to teleport the whole server, though, so you'll have to determine how to get each player's object (since I can't see your whole set-up).
Anyways, here's an example, based on your code:
local Players = game:GetService("Players"):GetPlayers() local TeleportService = game:GetService("TeleportService") TeleportService:TeleportPartyAsync(000000000, Players)