Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why do I get the error Teleport Failed: Cannot find game server?

Asked by 5 years ago

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.

0
must be linked to your game in game settings greatneil80 2647 — 5y
0
It is, I've managed to teleport to the place before trying to use it in a GUI when I just did it when the player touched a part. EmitRellevart 0 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
script.Parent.MouseButton1Click:connect(function()
    Player = game.Players.LocalPlayer
    game:GetService("TeleportService"):Teleport(“24510429789”,Player)
end)

Ad

Answer this question