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

How to make a GUI Gamepass Universe Teleporter?

Asked by 7 years ago

They've had one of these games when you press play and then it teleports you into another place, could someone teach me how to do that? I can't seem to get my head around it. Thank you.

1 answer

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago
--Place This script in the part
--This is a normal script

-- and you must have a place the place you want to teleport in your main place so the first 
--place you go to is the main 
-- game so the game where you have this place stored you must put the destination in this you 
--can do this by going under
-- Your game the 3 dots and configure I'm pretty sure

-- Touch Script

function onTouch(hit)
    local plrc = hit.Parent
    local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
    local TeleS = game:GetService("TeleportService")
    local place1 = theid
    local place2 = theid
        if plr then
            if place1 then
                TeleS:Teleport(place1, plr)
        end
    end
end
script.Parent.Touched:connect(function(onTouch)
-- Click Script(gui)
-- This needs to be a normal SCRIPT not a LocalScript
plr = script.Parent.Parent.Parent.Parent -- This should be the player make sure you keep 
-- going up by parents so you touch
-- just make sure it is the parent of the screengui

script.Parent.MouseButton1Click:connect(function()
    local TeleS = game:GetService("TeleportService")
    local place1 = theid
    local place2 = theid
        if plr then
            if place1 then
                TeleS:Teleport(place1, plr)
        end
    end
end

If this does not work tell me and I will try and resolve it if it works accept the answer

~~~ johndeer2233

Ad

Answer this question