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

How do I make a teleporter to another game? [closed]

Asked by 8 years ago

I really wanted to make this game called "Christmas Missions" on roblox, but I tried free models for teleporters and even teleporters I tried on my old account but it wont work! could you give me a code that will work please and what do I add to function it! Please help!

Locked by Goulstem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
2
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
8 years ago
Edited 8 years ago

In order to teleport to another game, you need to take advantage of TeleportService. TeleportService has a function called Teleport, which can send you to a specific game of your choice.

The Teleport function takes in 2 arguments..

  • The place ID to teleport to

  • The Player you wish to teleport

Note: The second argument may be nil if you are using this from a LocalScript.

local service = game:GetService("TeleportService");
local place = 20279777; --Voidacity's Script Builder
local plr = game.Players.Goulstem;

service:Teleport(place,plr);
0
So do I need a local script or just a plain script to use for this model? Goldenkings11 -11 — 8y
0
Either will work. I was just saying that if you do use this from a localscript, the 'plr' argument of the Teleport function isn't needed because it will default to the client. Goulstem 8144 — 8y
0
Okay, thanks! Goldenkings11 -11 — 8y
Ad