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: Help Please!

Previous Thread :: Next Thread 
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
22 Jul 2014 01:01 PM
I have this script In a billboard GUI and it works only if I have the name of the player. If I try .Character the output is "Character is not a valid member of Workspace." How do I make it so that any player can click this and have them teleport? I have put the billboard GUI in both the StarterGUI and the Brick that you click. Why does this not work?


function Click()
script.Parent.Parent.Parent.Parent.Humanoid.Torso.CFrame = CFrame.new(658.3, 201.601, -849)
end

script.Parent.MouseButton1Down:connect(Click)
Report Abuse
ninja900500 is online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
22 Jul 2014 01:16 PM
function Click(playerWhoClicked)
playerWhoClicked.Humanoid.Torso.CFrame = CFrame.new(658.3, 201.601, -849)
end

script.Parent.MouseButton1Down:connect(Click)
Report Abuse
ninja900500 is online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
22 Jul 2014 01:17 PM
Wait, that's for click detector. Use this:

function Click()
script.Parent.Parent.Parent.Humanoid.Torso.CFrame = CFrame.new(658.3, 201.601, -849)
end

script.Parent.MouseButton1Down:connect(Click)

You have one extra parent, I believe.
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
22 Jul 2014 01:17 PM
Thank you so much!
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
22 Jul 2014 01:21 PM
It still says that Humanoid and Character aren't members of workspace...
Report Abuse
ninja900500 is online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
22 Jul 2014 01:23 PM
Give me the hierarchy of the gui.
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
22 Jul 2014 01:25 PM
Game^
Workspace^
Part^
BillBoardGUI^
TextButton^
Script
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
22 Jul 2014 01:26 PM
LocalScript;

script.Parent.MouseButton1Down:connect(function()
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(658.3, 201.601, -849)
end)
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
22 Jul 2014 01:26 PM
Also in the player gui its

StarterGUI^
BillBoardGUI^
TextButton^
Script^
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
22 Jul 2014 01:28 PM
@ Goulstem Thank you so much it works!
Report Abuse
ninja900500 is online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
22 Jul 2014 01:31 PM
Should have done it that way if I knew that it was inside your startergui in the first place. XD
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
22 Jul 2014 07:25 PM
It works in F6 mode but it won't work when I try to play it for real why...?
Report Abuse
ninja900500 is online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
22 Jul 2014 10:46 PM
Try to do this:

Put "repeat wait() until game.Players.LocalPlayer.Character"
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
22 Jul 2014 10:51 PM
K thanks
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
22 Jul 2014 10:59 PM
It still won't work and there are no error's in output .-.
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
23 Jul 2014 04:16 PM
script.Parent.MouseButton1Down:connect(function() game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(658.3, 201.601, -849) end)

repeat wait() until game.Players.LocalPlayer.Character
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 04:17 PM
script.Parent.MouseButton1Down:connect(function()Spawn(wait);game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(658.3, 201.601, -849) end)

repeat Spawn(wait) until game.Players.LocalPlayer.Character
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
23 Jul 2014 04:43 PM
This crashes the game when you try to join :/
Report Abuse
ninja900500 is online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
23 Jul 2014 04:47 PM
My god.

repeat wait() until game.Players.LocalPlayer.Character

local Button = script.Parent

Button.MouseButton1Click:connect(function() game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(658.3, 201.601, -849) end)

Please thank if it's fixed...
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
23 Jul 2014 05:24 PM
Now it says "15:20:34 -- Players.ProxySoul.PlayerGui.TpTo.TextButton.Script:1:attempt to index field 'LocalPlayer' (a nil value)"
Report Abuse
ninja900500 is online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
23 Jul 2014 05:57 PM
Whole script.
Report Abuse
InfamousGorillas is not online. InfamousGorillas
Joined: 22 Apr 2014
Total Posts: 52
23 Jul 2014 05:58 PM
nerd is it local script

Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
23 Jul 2014 06:21 PM
repeat wait() until game.Players.LocalPlayer.Character

local Button = script.Parent

Button.MouseButton1Click:connect(function() game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(658.3, 201.601, -849) end)
Report Abuse
ProxySoul is not online. ProxySoul
Joined: 01 May 2010
Total Posts: 52
24 Jul 2014 12:19 PM
repeat wait() until game.Players.LocalPlayer.Character

local Button = script.Parent

Button.MouseButton1Click:connect(function() game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(658.3, 201.601, -849) end)


This only works in solo modee whyy?
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