How to make a part that will teleport you to another game when you touch it

i have been recenlty making a mario odessy style game and wanted to have more than one world the way that you would travel between worlds would be by a part that teleports you to a differnt game how would i do this?


You would have to create different places inside of the game and use TeleportService to teleport them. I can show you how to do if specifically if you want but there’s a lot of tutorials on YouTube that you could watch. :DD

Here’s the link to the article on it. TeleportService.

Edit: To create a new place, you have to open asset manager from the view tab at the top, go on places, right click on a blank area, and press “Add New Place”. Then you can rename it and copy the ID of it to put in the teleport script. This is how it would look like:

game:GetService('TeleportService'):Teleport(123456) -- place id here

ok thank you i have already made all of the second world and i did make it a different place inside of the first world


awesome! I found another article on this that has more information: TeleportService:Teleport
if you need more help, feel free to ask!

1 Like

sry i watched a tutorial on how to make this but didnt know that it doesnt work when playtesting lol

1 Like

i know nothing about scripting lol im just teaching myself and looking on devforum and youtube


i also need help with making it so that the teleporter only works once you have collected enough collectibles like in super mario odessey were you need to find a certain amount of start to get to the next world would you know how to do that? and also maybe how to make the collectibles lol

1 Like

im a modeler not a scripter so i dont know anything lol

1 Like

you could make a script in serverscriptservice that adds a player data folder into the player when they join the game and put an int value inside of it named “Collectibles” or something and increase it each time they get a collectable, then you could make the teleport script find the player data folder and check if the value of collectibles is more than a specific amount (for example 30 to get to the first level, 60 to get to the next one, and so on)

and if you want the value of collectibles displayed in the leaderboard, you could name the playerdata folder “leaderstats”

i dont know anything you just said lol i cant script at all but i could maybe look at a tutaroil on youtube do you have any suggestions for good tutoriols?

1 Like

hm I don’t really know any good tutorials for this but I could try to find one, I just don’t know what to search up lol

ok thats fine
30 letters 30 letters

1 Like

I found this leaderstat tutorial
it shows you how to make leaderstats, you would just have to make another script that checks the value of collectables and make sure it’s higher than a specific number. and also I think you should make a new topic for this, this one has already been solved and I don’t wanna get banned lol.

try this

local TPS = game:GetService("TeleportService")
local PlaceID = PlaceiD

local player = gaame.Players:GetPlayerFromCharacter(hit.Parent)
if player and player.leaderstats.Statname.Value then 
TPS:Teleport(PlaceID, player)

ok thank you so much for your help ill check that out

1 Like

i did make a different topic about this you can check it out

1 Like
local players = game:GetService("Players")
local teleports = game:GetService("TeleportService")
local getPlayerFromCharacter = players.GetPlayerFromCharacter
local teleportAsync = teleports.TeleportAsync

local part = script.Parent

local placeId = 0 --Change to teleport destination.

	local hitModel = hit:FindFirstAncestorOfClass("Model")
	if hitModel then
		local hitPlayer = getPlayerFromCharacter(players, hitModel)
		if hitPlayer then
			local success, result = pcall(teleportAsync, teleports, {hitPlayer}, placeId)
			if not success then

teleports.TeleportInitFailed:Connect(function(player, teleportResult, message)
	print("Failed to teleport "..player.Name..".")
1 Like

would this be how i made it so that the player would have to get a certain amount of collectibles to be able to get throught the teleporter i cant code but i can read some code