generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

How would I script GUI that teleports you to another place?

Previous Thread :: Next Thread 
tdogredman is not online. tdogredman
Joined: 21 Oct 2012
Total Posts: 384
04 Apr 2016 08:56 PM
I understand basic gui's and how they work, I just need help understanding how to code a teleport-on-buttonpress kind of thing.
Report Abuse
mattscy is not online. mattscy
Joined: 06 May 2011
Total Posts: 1079
04 Apr 2016 09:26 PM
--CONFIG---------------------------------------
local teleportposition = Vector3.new(0,10,0)
-----------------------------------------------

repeat wait() until game.Players.LocalPlayer

local lp = game.Players.LocalPlayer
local sp = script.Parent

sp.MouseButton1Click:connect(function()
if lp.Character then
lp.Character:SetPrimaryPartCFrame(CFrame.new(teleportposition + Vector3.new(0,2,0)))
end
end)


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image