I’m trying to teleport a player from the lobby to the main game. I tried doing this but it worked the first time I did it but now it’s not. I don’t know what’s wrong with it. tysm in advance
local Part = script.Parent
local TeleportService = game:GetService('TeleportService')
local placeID = 5789355763
local canTP = true
local function otherGame(otherPart)
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player and canTP then
print("A")
canTP = false
TeleportService:Teleport(placeID, player)
end
end
Part.Touched:Connect(otherGame)