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

How to correctly teleport a player to another game?

Code I have so far:

local ts = game:GetService("TeleportService")
local id = 1234567890 --this is an example id 
game.Players.PlayerAdded:Connect(function(plr)
	ts:Teleport(id, plr)
end)

What I'm trying to get at is teleporting somebody upon entry of the game to another game. But it doesn't do anything. There are no errors that show up, only the error where it says I cannot be teleported in studio, but when tried in game, nothing happens. What am I doing wrong?

1 comment

0

I posted an answer, please see if it solves your problem and make it a solution. Thanks!

2 answers

Make a place inside of the place. Meaning, go to the game explorer, go to places and make a new place! Then, copy the id of that place!

Hope this helped!

Your code doesn't seem to have any problems with me. The reason it's not teleporting is because you're testing inside Roblox Studio, and Roblox Studio doesn't allow teleporting. You can only teleport inside games, so publish your game and test it directly from there. Hope this helps!

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