Hello ScriptingHelpers! I have a problem with teleport service, where I finally get no errors, but the teleportation never occurs. Here's the code. (This is in a server script, by the way.)
local ts = game:GetService("TeleportService")
local btn = script.Parent
local gameID = 6266940721
game.Players.PlayerAdded:Connect(function(player)
plr = player
end)
local function teleporter(gameID, plr)
local plr = game.Players:FindFirstChild(plr)
print("Teleporting to game")
ts:Teleport(plr, gameID)
end
btn.Activated:Connect(function()
teleporter(gameID, plr)
end)
All help is appreciated!

2 comments
You swapped the parameters of ts:Teleport(). The placeID comes first, then the player. Also it won't work on studio
You swapped the parameters of ts:Teleport(). The placeID comes first, then the player. Also it won't work on studio