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
 

Need Help targeting area

Previous Thread :: Next Thread 
X888X is not online. X888X
Joined: 08 Oct 2011
Total Posts: 243
14 Mar 2013 09:56 PM
Hello, I'm still quite new at scripting so I need help targeting, I've tried everything.

What I tried:
script.Parent.Parent.Parent.Menu

Target:
Menu > Test > TextButton (Where the script is)

If not that then:
Testing > Menu > Test > TextButton (Where the script is)

I really need help to this, I'm going to continue trying but doubt I'll get anything.
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
14 Mar 2013 09:57 PM
What are you trying to do? post the whole script please
Report Abuse
X888X is not online. X888X
Joined: 08 Oct 2011
Total Posts: 243
14 Mar 2013 09:59 PM
function Click()
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(0,0,0)
end

script.Parent.MouseButton1Down:connect(Click)
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
14 Mar 2013 10:00 PM
output?
Report Abuse
X888X is not online. X888X
Joined: 08 Oct 2011
Total Posts: 243
14 Mar 2013 10:01 PM
Sorry what? I'm still a noob to this stuff.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
14 Mar 2013 10:04 PM
How many layers is your script dwon from your menu? You have to target menu's parent before you can target menu.

So let's say menu is in workspace and your script is 3 levels down.

Workspace <--- you need to target workspace/Menu's parent
>Menu
>>?
>>>?
>>>>?
>>>>>Script--------------------------------------------------------------Menu again
-------------------------------------------------------------------------------------v
So you would use script.Parent.Parent.Parent.Parent.Parent.Menu
------------------------------------------------------------------^----------^
Menu Workspace
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
14 Mar 2013 10:05 PM
>Menu
>>?
>>>?
>>>>?
>>>>>Script--------------------------------------------------------------Menu again
-------------------------------------------------------------------------------------v
So you would use script.Parent.Parent.Parent.Parent.Parent.Menu
------------------------------------------------------------------^----------^
--------------------------------------------------------------Menu---Workspace

*bad formatting on my part
Report Abuse
X888X is not online. X888X
Joined: 08 Oct 2011
Total Posts: 243
14 Mar 2013 10:08 PM
Testing
>Menu
>>Test
>>>TextButton (Script is inside here)
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
14 Mar 2013 10:10 PM
script.Parent.Parent.Parent.Parent.Menu
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
14 Mar 2013 10:13 PM
click view then click output then run ur place then copy the stuff in the output and post it
Report Abuse
X888X is not online. X888X
Joined: 08 Oct 2011
Total Posts: 243
14 Mar 2013 10:16 PM
Not working :/
Report Abuse
X888X is not online. X888X
Joined: 08 Oct 2011
Total Posts: 243
14 Mar 2013 10:28 PM
23:28:23.048 - MouseButton1Down is not a valid member of Frame
23:28:23.051 - Script "Players.Player1.PlayerGui.Testing.Menu.Test.TextButton.Scri", Line 5
23:28:23.053 - stack end
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
14 Mar 2013 10:35 PM
http://wiki.roblox.com/index.php/Beginner%27s_guide_to_GUI
Report Abuse
X888X is not online. X888X
Joined: 08 Oct 2011
Total Posts: 243
14 Mar 2013 10:44 PM
:/
Report Abuse
X888X is not online. X888X
Joined: 08 Oct 2011
Total Posts: 243
14 Mar 2013 10:46 PM
I found out the problem, it wasn't what I though, thanks for the help guys!
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