|
| 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 |
|
|
| |
|
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 |
|
|
|
| 30 May 2014 08:49 PM |
| Sorry man, but it didn't work for me... |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|