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 » Scripting Helpers
Home Search
 

Re: Teleport GUI

Previous Thread :: Next Thread 
Zachary113 is not online. Zachary113
Joined: 06 Oct 2008
Total Posts: 173
22 Apr 2013 09:19 PM
I was wondering how to make a Teleport GUI... Can someone help?
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
22 Apr 2013 09:21 PM
You're gonna have to be a little more clear then that.
Report Abuse
ninetailfox73 is not online. ninetailfox73
Joined: 11 Mar 2008
Total Posts: 1954
22 Apr 2013 09:21 PM
http://wiki.roblox.com/index.php/MouseButton1Click_(Event)
http://wiki.roblox.com/index.php/Teleportation
Report Abuse
Zachary113 is not online. Zachary113
Joined: 06 Oct 2008
Total Posts: 173
22 Apr 2013 09:27 PM
Like, there's a little GUI with three buttons: "Headquarters" and "Arena" and "Lobby"... How would you make a GUI that when you click the button, you'll teleport to that area?
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
22 Apr 2013 09:33 PM
Insert the button. Put a script in it. You'll need..

- Position where you want them to teleport (EX. (0, 50, 0)
- The Characters Torso

function ButtonPressed()
Torso.CFrame = CFrame.new (#, #, #)
end

YourGUIButton.MouseButton1Down:connect(ButtonPressed)

--This is an example. You'll need to edit your Variables.
Report Abuse
oSo is not online. oSo
Joined: 01 Dec 2007
Total Posts: 808
22 Apr 2013 09:36 PM
--Put this in a local script in the Text Button.

local player = game.Players.LocalPlayer
script.Parent.Clicked:connect(function()
player.Character:MoveTo(Vector3.new(0, 100, 0))
end)
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
22 Apr 2013 09:37 PM
It does't have to be local.
Report Abuse
oSo is not online. oSo
Joined: 01 Dec 2007
Total Posts: 808
22 Apr 2013 09:38 PM
--Put this in a local script in the Text Button.

local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
player.Character:MoveTo(Vector3.new(0, 100, 0))
end)

EDIT: I used the 'Clicked' event made for 'Click Detectors' by accident. Replaced with 'MouseButton1Click' which is made for GUI objects.
Report Abuse
oSo is not online. oSo
Joined: 01 Dec 2007
Total Posts: 808
22 Apr 2013 09:39 PM
@killer, Please get your facts straight! It does!

'local player = game.Players.LocalPlayer' --Find the local player in Players duhh it has to be local. Lol
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
22 Apr 2013 09:40 PM
That particular line requires it. My point was it is not required to use a local script if you have different variables. I generally do script.HoweverManyParents.Character.
Report Abuse
oSo is not online. oSo
Joined: 01 Dec 2007
Total Posts: 808
22 Apr 2013 09:42 PM
@Killer, Ahhh but, its a lot more confusing that way, I like using game.Players.LocalPlayer


I see wat you mean now
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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