This is the code for the button in a GUI that should teleport the player to another place when clicked:
script.Parent.MouseButton1Click:connect(function() game:GetService("TeleportService"):Teleport(24510429789) end)
However when I click the button it says Teleport Failed: Cannot find game server. The ID I put in is definitely correct.
script.Parent.MouseButton1Click:connect(function() Player = game.Players.LocalPlayer game:GetService("TeleportService"):Teleport(“24510429789”,Player) end)