Good evening Roblox developer forum. I’m new to teleportation service and I think I’m getting the hang of it, but this stumped me because I don’t really know how to fix it.
local TeleportService = game:GetService("TeleportService")
local Paren = script.Parent
local placeId = 127208276999070
local B = Instance.new("TeleportOptions")
B.ShouldReserveServer = true
local function Tele(Person)
TeleportService:TeleportAsync(placeId,{Person},B)
end
Paren.Triggered:Connect(Tele)
I genuinely am very stumped, if someone can help me with this and provide a source for learning more about this (outside of the documentation that would be nice :]
You would need to use ReserveServer and then teleport the server to the private server.
For example:
local TeleportService = game:GetService("TeleportService")
local PLACE_ID = 123456789
local privateServerCode = TeleportService:ReserveServer(PLACE_ID)
TeleportService:TeleportToPrivateServer(PLACE_ID, privateServerCode, {player})
(I know it’s in documentation, sorry, but it’s very helpful and theres lots of code examples )
So what the code is basically doing, is Reserving a server, and that server is being used as the private server code for the player, if you’re correct, it creates a new server for the player right?
well it’s not really an “error” but it’s a thing that happens when the server gets filled, I want it to create a new server but it just ends up going to the same server
local Paren = script.Parent
local placeId = 127208276999070
local B = TeleportService:ReserveServer(placeId)
local function Tele(Person)
TeleportService:TeleportToPrivateServer(placeId,B,{Person})
end
Paren.Triggered:Connect(Tele)
That’s because you’re reserving the server code once when the script runs initially. Now if I understand correctly, you want to make it reserve for each person. So reserve the server code for each person inside the Tele function