Teleport With Textbutton Not Working

Hello Devforum members,
It has come to my attention my local script with teleport does not work. Any help would be appreciated. It doesn’t work in game, http server and teleport service is enabled on both games. Here is my script for any weary travelers:

local teleButton = script.Parent.PlayButton


local player = game:GetService("Players").LocalPlayer
local TeleportService = game:GetService('TeleportService')



local placeID = 8776773321



local canTeleport = true



local function otherGame()


	if player and canTeleport then

		canTeleport = false

		TeleportService:Teleport(placeID, player)

	end

end



teleButton.MouseButton1Down:Connect(otherGame)```
Local script.

Wouldn’t it be TeleportService:TeleportAsync() and not TeleportService:Teleport()

local teleButton = script.Parent.PlayButton

local player = game:GetService("Players").LocalPlayer
local TeleportService = game:GetService('TeleportService')

local placeID = 8776773321
local canTeleport = true

local function otherGame()
	if player and canTeleport then
		canTeleport = false
		TeleportService:TeleportAsync(placeID, player)
	end
end

teleButton.MouseButton1Down:Connect(otherGame)```

Thanks, works good now. Thanks very much.

TeleportService:Teleport(placeID)

https://developer.roblox.com/en-us/api-reference/function/TeleportService/Teleport

Your script looks fine, I’m guessing 3rd party teleports were disabled.

image

Yeah, your script worked for me.