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: Local Script + GUI = Teleport Service

Previous Thread :: Next Thread 
rowerowe71 is not online. rowerowe71
Joined: 14 Apr 2013
Total Posts: 1999
30 May 2014 08:00 PM
So this is a local script in StarterGui...

How do I fix it?


local player1 = game.Players.LocalPlayer
local TDMbutton = player1.PlayerGui.TDM.TextButton

function TDMteleport_function(player1)
game:GetService("TeleportService"):Teleport(158626387, player1)
end
TDMbutton.MouseButton1Down:connect(TDMteleport_function)
Report Abuse
rowerowe71 is not online. rowerowe71
Joined: 14 Apr 2013
Total Posts: 1999
30 May 2014 08:21 PM
bump
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
30 May 2014 08:38 PM
function TDMteleport_function(player1) -> function TDMteleport_function()

You also don't need to give the player argument since you're doing it from a LocalScript. It's only required in a server-side script.
Report Abuse
rowerowe71 is not online. rowerowe71
Joined: 14 Apr 2013
Total Posts: 1999
30 May 2014 08:49 PM
Sorry man, but it didn't work for me...
Report Abuse
rowerowe71 is not online. rowerowe71
Joined: 14 Apr 2013
Total Posts: 1999
31 May 2014 04:34 AM
bump
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
31 May 2014 04:38 AM
So this is a local script in StarterGui...

How do I fix it?


local TDMbutton = player1.PlayerGui:WaitForChild("TDM"):WaitForChild("TextButton")

function Teleport(player1)
game:GetService("TeleportService"):Teleport(158626387, game.Players.LocalPlayer)
end
TDMbutton.MouseButton1Down:connect(Teleport)
Report Abuse
rowerowe71 is not online. rowerowe71
Joined: 14 Apr 2013
Total Posts: 1999
31 May 2014 04:47 AM
Ok so that didn't work.

I decided to put all the stuff you need to make this work in a free model. And if you get the time you can help me figure out how to fix it.

In the model
+Local Script
+Screen Gui with TextButtons and TextBoxes

Heres the link: http://www.roblox.com/Gui-Teleport-Service-Issue-item?id=159309829


P.S. I might not be free yet but just wait a little while.
Report Abuse
MiniNob is not online. MiniNob
Joined: 14 May 2013
Total Posts: 822
31 May 2014 05:47 AM


game.Players.LocalPlayer.PlayerGui:WaitForChild("TDM"):WaitForChild("TextButton").MouseButton1Down:connect(function()
game:GetService("TeleportService"):Teleport(158626387)
end))
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