Around a year ago, I attempted to make my first game. I tried to make a story game, which I now realize was a bad choice for a first game as I knew nothing. As you could guess, it was a major failure. I decided to come back to it a few days ago, and everything was going smooth, except for one problem.
Teleportation.
I can’t seem to figure out how they manage to send only the people in the vehicle to a new server without doing any of the following:
- sending them to a server already running
- sending them to an empty but finished server that didn’t quite shut down yet
- having someone join their own server
Here is my script so far. It revolves around a canoe with multiple seats that leave every 30 seconds. The script is inside of the part you touch to teleport into the canoe. The function fires when you touch the part.
local TeleportService = game:GetService("TeleportService")
local Place = --place ID
function onTouched(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
wait(0)
TeleportService:Teleport(Place, player)
end
end
script.Parent.Touched:connect(onTouched)
I’ve tried using TeleportService:TeleportToPrivateServer() but that doesn’t work. Then I thought that it might have to do with TeleportService:ReserveServer(). I couldn’t figure that out as all that gave me was a variety of errors. The game server is in another place inside the game and the lobby is the main place/spawn place. If I can’t figure this out, I’m going to adapt it to be a 1-player story game.
I bet the answer is so obvious and I just didn’t realize it.
I do know how to make sure the players in the canoe teleport at the same time, I just haven’t added it yet. I just don’t know how to teleport them to their own server.