|
| 22 Apr 2013 09:19 PM |
| I was wondering how to make a Teleport GUI... Can someone help? |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2013 09:21 PM |
| You're gonna have to be a little more clear then that. |
|
|
| Report Abuse |
|
|
|
| 22 Apr 2013 09:21 PM |
http://wiki.roblox.com/index.php/MouseButton1Click_(Event) http://wiki.roblox.com/index.php/Teleportation |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 22 Apr 2013 09:37 PM |
| It does't have to be local. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|