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

Invalid Player To Teleport, Place Teleportation Issues?

Asked by 9 years ago

So I was working on a (place) teleportation script, and I kept getting a error saying Invalid Player To Teleport in which I'm trying to figure out why it isn't working, here's the code in which when you press the button it is to "teleport" you to the certain game. I tried two different pieces of code:

function GoTo()
game:GetService("TeleportService"):Teleport(159011061)
end

script.Parent.MouseButton1Click:connect(GoTo)
function GoTo()
game:GetService("TeleportService"):Teleport(159011061, game.Players.LocalPlayer)
end

script.Parent.MouseButton1Click:connect(GoTo)

When ever the button is clicked it keeps making to error. Does anyone know how to fix this issue?

Answer this question