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

Problem with TeleportService?

Asked by 8 years ago

I have this error every so often so I have to spam click. https://gyazo.com/b8205c0c17681364a34698382ab6edc4

script.Parent.MouseButton1Click:connect(function()
    local TeleportService = game:GetService("TeleportService")
    TeleportService:Teleport(425571759,game.Players.LocalPlayer)
end)

The game is in the same universe

I found a temporary fix, by repeating the script until you teleport

0
see the local script setup for teleporting http://wiki.roblox.com/index.php?title=API:Class/TeleportService/Teleport u dont need the second param in its example User#5423 17 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

I don't really have an answer to this, but I did it a different way and it works perfectly fine:

player = game.Players.LocalPlayer
placeId = PLACEID

script.Parent.MouseButton1Click:connect(function()
    game:GetService("TeleportService"):Teleport(placeId, player)
end)

~ For some reason I can't comment?

0
Seems the same, maybe its that I am teleporting to a 1 player game. LittleBigDeveloper 245 — 8y
Ad

Answer this question