Im trying to make a teleport system that will teleport a single player to a reserved server, I have read the Reserved server and teleporting to a reserved server. They still don't help me. I keep get a 403 http error thanks! Heres My code:
local TS = game:GetService("TeleportService") local code = TS:ReserveServer(4742624633) script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then TS:TeleportToPrivateServer(4742624633,code,player) end end)
I also get a unable to cast value to object error.
There is a simple Cause of this, TeleportService:TeleportToPrivateServer()
requires as Argument 3 a Table with Players you want to Teleport.
Teleport service doesn't work In Studio. Make sure you are playing in The Roblox Client
Normally you get a
Cannot teleport in studio
error
Simply replace
TS:TeleportToPrivateServer(4742624633,code,player)
with
TS:TeleportToPrivateServer(4742624633,code, {player})
Make sure you are playing in Roblox
As i said you normally get a other error. So i'm not sure.
local TS = game:GetService("TeleportService") local code = TS:ReserveServer(4742624633) script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then TS:TeleportToPrivateServer(4742624633,code,player) end end)