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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 09 Jul 2011 10:45 PM |
Script is at the bottom.*********
Darn these typos tonight! Now I've surely confused him! :( |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|