So I’m trying to make it so I only teleport people that are in the folder ‘InRound’. They are saved as there player name in a string Value. So take me for example my roblox name is TheDCraft and if I was put into that folder I would be a string Value called ‘TheDCraft’ so I’m trying to make it so only people in that folder can be teleported to the game.
I thought I might be on to something in the comment not sure if that’s well executed. Please help. Also the the two lines after Local Function Teleport() is the map name and the I want them to teleport on a random part of the map. So when they teleport there it’s random.
The thing thats wrong in that code is you doing player.Character when player is a string value, for that you do game.Players:FindFirstChild(player.Name) to know the player,
Another thing is doing game.Players:GetChildren().Name , this wont work basically because game.Players:GetChildren() returns a table with the children names, also you should do :GetPlayers() instead of GetChildren so you could do another thing which would be:
This function teleports a group of Players to the same server instance in the given place. It returns the DataModel.JobId of the server instance the players were teleported to.
This function teleports one or more Players to a reserved server created using TeleportService:ReserveServer. The reservedServerAccessCode parameter is the access code returned by ReserveServer TeleportToPrivateServer can only be called on the server.
Else just GetChildren() in the folder and find these children in workspace. Then set the CFrame
This will never teleport a player because the data inside the InRound folder is a string value and doesn’t hold any of a players characteristics like HumanoidRootPart.
To be honest I’m not that good at scripting. Only been doing it for a couple days. So I’m not sure how to parent the character to the folder and whitelist. I need to do more research into roblox lua.