I’ve tried the dev hub, Roblox and Roblox studio discord server
local TPS = game:GetService("TeleportService") -- We got da teleport service
game.Players.PlayerAdded:Connect(function()
game.ReplicatedStorage.TeleportPlayers.Event:Connect(function(player, ChosenMap)
print("Remote event fired")
local reservedServerCode = TPS:ReserveServer(9373052616)
print("The private server code is "..reservedServerCode)
print("Teleporting "..player.Name.." to the private server")
local TeleportingScreen = script.Teleporting:Clone()
TeleportingScreen.Parent = game.Players:FindFirstChild(player.Name).PlayerGui
TPS:TeleportToPrivateServer(9373052616, reservedServerCode, ChosenMap, {player}) -- error line
end)
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
local TPS = game:GetService("TeleportService") -- We got da teleport service
game.Players.PlayerAdded:Connect(function()
game.ReplicatedStorage.TeleportPlayers.Event:Connect(function(player, ChosenMap)
print("Remote event fired")
local reservedServerCode = TPS:ReserveServer(9373052616)
print("The private server code is "..reservedServerCode)
print("Teleporting "..player.Name.." to the private server")
local TeleportingScreen = script.Teleporting:Clone()
TeleportingScreen.Parent = game.Players:FindFirstChild(player.Name).PlayerGui
TPS:TeleportToPrivateServer(9373052616, reservedServerCode, {player}, "ChosenMap")
end)
end)