TeleportService not working

Hey, TeleportService is not teleporting me to the game I have asked for, all settings in relation to this are enabled. The other game is public.

Here is the code:

local teleportButton = game:WaitForChild("StarterGui"):WaitForChild("ScreenGui"):WaitForChild("Frame"):WaitForChild("TextButton")
local teleportService = game:GetService("TeleportService")

local destinationPlaceId = 6441957573 -- Replace with the actual Place ID of the destination
local destinationSpawnLocation = Vector3.new(10, 5, 0) -- Replace with the actual spawn location

function buttonHover()
    teleportButton.TextColor3 = Color3.new(203, 64, 0)
end

function buttonHoverLeave()
    teleportButton.TextColor3 = Color3.new(255, 77, 0)
end

function teleportPlayer()
    local player = game.Players.LocalPlayer

    -- Check if LocalPlayer exists
    if not player then
        print("LocalPlayer not found.")
        return
    end

    -- Attempt to teleport the player
    local success, errorMessage = pcall(function()
		teleportService:Teleport(destinationPlaceId, player)
    end)

    -- Check if teleportation was successful
    if not success then
        print("Teleportation failed:", errorMessage)
    end
end

teleportButton.MouseEnter:Connect(buttonHover)
teleportButton.MouseLeave:Connect(buttonHoverLeave)
teleportButton.MouseButton1Click:Connect(teleportPlayer)```

Did you try this in Studio? If yes, teleporting doesn’t work in Studio and you should test in the Roblox Player.

If not and you tested in Roblox Player, try switching to TeleportService:TeleportAsync(). Just click the blue text to see its documentation.

Does this also work in the Roblox app from the Microsoft Store?

yes, yes it does, forgot to mention

So where do I attach the :TeleportAsync function to?

so that does that mean no?

just replace the function name and make the player a table like this {player}

Still does not work. Here is my code again:

local teleportButton = game:WaitForChild("StarterGui"):WaitForChild("ScreenGui"):WaitForChild("Frame"):WaitForChild("TextButton")
local teleportService = game:GetService("TeleportService")

local destinationPlaceId = 6441957573 -- Replace with the actual Place ID of the destination
local destinationSpawnLocation = Vector3.new(10, 5, 0) -- Replace with the actual spawn location

function buttonHover()
    teleportButton.TextColor3 = Color3.new(203, 64, 0)
end

function buttonHoverLeave()
    teleportButton.TextColor3 = Color3.new(255, 77, 0)
end

function teleportPlayer()
    local player = game.Players.LocalPlayer

    -- Check if LocalPlayer exists
    if not player then
        print("LocalPlayer not found.")
        return
    end

    -- Attempt to teleport the player
    local success, errorMessage = pcall(function()
		teleportService:TeleportAsync{player, destinationPlaceId}
    end)

    -- Check if teleportation was successful
    if not success then
        print("Teleportation failed:", errorMessage)
    end
end


-- Button Calls 

teleportButton.MouseEnter:Connect(buttonHover)
teleportButton.MouseLeave:Connect(buttonHoverLeave)
teleportButton.MouseButton1Click:Connect(teleportPlayer)```

not like that, like this

teleportService:TeleportAsync(destinationPlaceId, {player})