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

I need a script that allows players to teleport to a non games place when they touch a brick?

Asked by 9 years ago

I am making a place where people can teleport to different place and i have noticed that you cant teleport to a place unless it is apart of a game, please can some one help me with the code i should use.

1 answer

Log in to vote
0
Answered by 9 years ago

You can just use a generic teleport script. The place that your sending the player just has to make the destination place a part of the Main Games Universe.

In the Teleport Brick as a Server-Side Script

button = script.Parent

function onTouch(other)
    local human = other.Parent:FindFirstChild("Humanoid")
    if not human then return end
    b=script.Parent.Tele1:Clone()
    b.Parent=human
    local player = game.Players:GetPlayerFromCharacter(other.Parent)
    if not player then return end
end

button.Touched:connect(onTouch)

In the Teleport Brick as a Local Script

game:GetService('TeleportService'):Teleport(158361348) --Insert Place ID here!
  • Michael

P.S. More Information of Universes here!

http://roblox.wikia.com/wiki/Game_Universe http://blog.roblox.com/2012/01/the-big-bang-at-roblox-universe-creation/ http://wiki.roblox.com/index.php?title=Games

0
Thanks DaethlyAngle1923 0 — 9y
0
Now rate up and set the reply as the Answer. :3 Michael007800 144 — 9y
Ad

Answer this question