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: Broken Script

Previous Thread :: Next Thread 
XVeris is not online. XVeris
Joined: 12 Jan 2011
Total Posts: 26
09 Jul 2011 10:18 PM
button = script.Parent
player = button.Parent.Parent.Parent

function onClick()
print("Reseted!")
player.Character:BreakJoints()
end

button.MouseButton1Click:connect(onClick)

Can somebody help me out? I found this reset GUI on roblox.wikia.com, and i tried it, but it dont work. Can somebody explain why and try to fix it? I'm kinda a noob when it comes to scripting, lol.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
09 Jul 2011 10:20 PM
Your GUI setup HAS to look like this:


+ StarterGui
- - + ScreenGui
- - - - +TextButton
- - - - - - + Script


I suspect an indexing problem. Make sure the setup is like above.
Report Abuse
XVeris is not online. XVeris
Joined: 12 Jan 2011
Total Posts: 26
09 Jul 2011 10:22 PM
I have a frame in there in between the screengui and textbutton, is that why it dont work?
Report Abuse
XVeris is not online. XVeris
Joined: 12 Jan 2011
Total Posts: 26
09 Jul 2011 10:41 PM
yay, i tried that order, and it works now. Why didn't it work before? with the frame?
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
09 Jul 2011 10:43 PM
You forgot a .Parent.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
09 Jul 2011 10:44 PM
The indexing was wrong. Think of that as a ladder. Script is at the top. Each '.Parent' will go up one rung of the ladder. With the Frame in there, there was an extra 'rung' in your ladder, which you did not account for.

Is that clear enough for you to understand? I'm not so good at explaining...
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
09 Jul 2011 10:45 PM
Script is at the bottom.*********


Darn these typos tonight!
Now I've surely confused him! :(
Report Abuse
XVeris is not online. XVeris
Joined: 12 Jan 2011
Total Posts: 26
09 Jul 2011 10:52 PM
To tell the truth, you havent confused me much at all. i'm making a Battlebots game, and I need at least two buttons, i got the reset now, but I need a button that pop ups a menu with buttons on it, a bit like srg's in pokemon arena x. Sorry if it sounds complicated, but I dont want to use free models I'll edit, cause when i searched for "Battlebots" in free models while building my game, all i got was a few spinning saws that kill anything that touchs them, and a arena with tiny tanks :(.
Report Abuse
XVeris is not online. XVeris
Joined: 12 Jan 2011
Total Posts: 26
09 Jul 2011 11:03 PM
If yo can help, pm me about the pop-up menu button
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