I was wondering how I could teleport all players in a car (just like in camping) to a reserved server. I have tried many scripts, but none have been working for me so I decided to make my own post.
here is my code:
local PlayersToTeleport = {
workspace.Car1.Seat.Occupant
}
local PlaceId = 1234567 -- my place ID
local code = game:GetService("TeleportService"):ReserveServer(game.PlaceId)
game:GetService("TeleportService"):TeleportToPrivateServer(game.PlaceId, code, PlayersToTeleport)
I have 3 cars, with 10 seats each. My goal is to teleport these players to a reserved server (it would be even better if I could set a minimum amount of players and then a countdown until teleport, but I'm just trying to get it to work first.) I put this script into ServerScriptService (there are three scripts, each with a different car.) I have already tried making one script and naming all the cars the same thing, but nothing worked. I have been trying for a while, and any help would be appreciated, thank you so much!

1 comment
If my answer helped, don’t forget to accept!