I have a LocalScript in a TextButton which is inside a SurfaceGUI, which when it is clicked, it teleports you to another place, but instead, all it does is say in the Output "Invalid Player to teleport". I would need help as I tried with a Server script and a Local one but it still doesn't work. Thanks!
local TeleportService = game:GetService("TeleportService")
function leftClick()
TeleportService:Teleport("4769406515")
end
script.Parent.MouseButton1Click:Connect(leftClick)

4 comments
It still doesn't work, but shows nothing in the output, neither in-game or in studio.
"In some circumstances a teleport may fail. This can be due to the developer configuring the teleport incorrectly or issues with ROBLOX servers."
Read up on the Teleport function I have hyperlinked to debug ^^
you cant teleport to a game in studio u have to do it in roblox