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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Tele OnClick

Previous Thread :: Next Thread 
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 03:32 PM
Im trying to make a GUI that teleports you to a brick and remove the GUI on click.
It is not working here it is:


function Click()
Workspace.Player.Humanoid:MoveTo(Workspace.SpawnLocation1.Position, Workspace.SpawnLocation1)---
script.Parent.Parent.Visible = false
end

script.Parent.MouseButton1Down:connect(Click)


Please explain why this is not working and give the answer.


Report Abuse
LordDominayte is not online. LordDominayte
Joined: 20 Jul 2013
Total Posts: 449
27 Oct 2013 03:34 PM
A little bit more information would be nice, for example what part of it isn't working - is the teleport part working but not the remove GUI part?

.: LD :.
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 03:38 PM
It Is The Teleport which is not working
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 03:39 PM
Basicly nothing happens...
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 04:04 PM
Please Help I NEED the answer!
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
27 Oct 2013 04:11 PM
Workspace.Player <--Where is this defined?
Report Abuse
LordOfTheAtoms is not online. LordOfTheAtoms
Joined: 22 Jul 2012
Total Posts: 4030
27 Oct 2013 04:13 PM
Aye internet is right

function Click()
Workspace.Player.Humanoid:MoveTo(Workspace.SpawnLocation1.Position, Workspace.SpawnLocation1)---
script.Parent.Parent.Visible = false
end
Report Abuse
LordOfTheAtoms is not online. LordOfTheAtoms
Joined: 22 Jul 2012
Total Posts: 4030
27 Oct 2013 04:14 PM
oops sorry don't use that

function Click(Player)
Workspace.Player.Humanoid:MoveTo(Workspace.SpawnLocation1.Position, Workspace.SpawnLocation1)---
script.Parent.Parent.Visible = false
end
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
27 Oct 2013 04:19 PM
You guys realize Humanoid:MoveTo() makes the humanoid walk to the position?

Use CFrame to teleport:


Character.Torso.CFrame = CFrame.new(SpawnLocation.Position)
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 04:25 PM
That did not work either.
Am i putting it in wrong?



function Click(Player)
Workspace.Player.Torso.CFrame = CFrame.new(SpawnLocation1.Position)---
script.Parent.Parent.Visible = false
end

script.Parent.MouseButton1Down:connect(Player)



Please tell me if i put this in right.
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
27 Oct 2013 04:27 PM
change

Workspace.Player.Torso.CFrame = CFrame.new(SpawnLocation1.Position)

to

game.Players[Player].Character.Torso.CFrame = CFrame.new(SpawnLocation1.Position)
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 04:36 PM
Did not work either!


WHATS WRONG WITH IT!

XD
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 04:39 PM
Here it is now:

function Click(Player)
game.Players[Player].Character.Torso.CFrame = CFrame.new(SpawnLocation1.Position)---
script.Parent.Parent.Visible = false
end

script.Parent.MouseButton1Down:connect(Player)
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 04:43 PM
Does anyone have an answer?
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 04:51 PM
Ok i am seriously desperate for the script that teleports only the one who clicks.
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 04:55 PM
The Output always replies with: Disconnected event because of exception
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 05:03 PM
Please Help!
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Oct 2013 05:03 PM
function Click()
Game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(SpawnLocation1.Position)---
script.Parent.Parent.Visible = false
end

script.Parent.MouseButton1Down:connect(Player)
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 05:09 PM
That dident work...

Do i have to place that into a local script?
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 05:14 PM
A Local Script?
Report Abuse
Z4ckZ4k is not online. Z4ckZ4k
Joined: 07 Jul 2013
Total Posts: 160
27 Oct 2013 05:18 PM
function Click()
Workspace.Player1:MoveTo(Workspace.SpawnLocation1.Position)---
script.Parent.Parent.Visible = false
end

script.Parent.MouseButton1Down:connect(Click)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Oct 2013 05:19 PM
yes
Report Abuse
kindcdog09 is not online. kindcdog09
Joined: 18 Nov 2010
Total Posts: 2421
27 Oct 2013 05:25 PM
If you put command and output, press play, and it will tell you your answer.
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
27 Oct 2013 05:32 PM
It said this:

function Click()
Game.Players.LocalPlayer.Character.Torso.C:6: attempt to index global 'script' (a nil value)
17:30:56.029 - Script 'function Click()
Game.Players.LocalPlayer.Character.Torso.C', Line 6
17:30:56.030 - stack end


Whats the nil value?
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
27 Oct 2013 05:35 PM
"nil value" means that it doesn't exist. Anyways, make sure it's in a LocalScript, and replace your Click function with this:

function Click()
game.Players.LocalPlayer.Player:MoveTo(game.Workspace.SpawnLocation1.Position)
game.Players.LocalPlayer.PlayerGui.SCREENGUI_NAME.GUIOBJECT_NAME.Visible = false -- Swag out SCREENGUI_NAME and GUIOBJECT_NAME
end

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
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