Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Problem with TeleportService?

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

1 comment

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

1 answer

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?

1 comment

0

Seems the same, maybe its that I am teleporting to a 1 player game.

This discussion is preserved as it was. New answers, comments, and votes are closed.