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
 

Whats wrong with this?

Previous Thread :: Next Thread 
Kingslaya356 is not online. Kingslaya356
Joined: 09 Jul 2008
Total Posts: 178
05 Aug 2011 03:55 PM
So I have a text button that's on my "main" GUI frame and what I'm trying to get it to do is once its clicked I want it to close the "main" frame(Frame1) and open the "New" frame (Frame). So here it is. I don't know why its not working.

local Button = script.Parent
Frame = script.Parent.Parent.Parent.Level1Frame
Frame1= script.Parent.Parent.SpellMenu

function onClick()

Frame1.Visible= false
wait(0.1)
Frame.Visible = true

end

Button.MouseButton1Click:connect(onClick)
Report Abuse
bballer13sn is not online. bballer13sn
Joined: 03 Jun 2009
Total Posts: 2490
05 Aug 2011 03:57 PM
Try this:

script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Parent.Level1Frame.Visible = true
script.Parent.Parent.SpellMenu.Visible = false
end)
Report Abuse
Kingslaya356 is not online. Kingslaya356
Joined: 09 Jul 2008
Total Posts: 178
05 Aug 2011 03:58 PM
Just that? Nothing else?
Report Abuse
bballer13sn is not online. bballer13sn
Joined: 03 Jun 2009
Total Posts: 2490
05 Aug 2011 03:59 PM
No need for more. If it still doesn't work, double check the paths to the two frames.
Report Abuse
Kingslaya356 is not online. Kingslaya356
Joined: 09 Jul 2008
Total Posts: 178
05 Aug 2011 04:17 PM
thanks this worked

script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Parent.Level1Frame.Visible = true
script.Parent.Parent.Parent.SpellMenu.Visible = false
end)

I had to add another "Parent" to the 3rd line
Report Abuse
bballer13sn is not online. bballer13sn
Joined: 03 Jun 2009
Total Posts: 2490
05 Aug 2011 04:18 PM
Ah. Well, I am sorry that I was unable to fix this...But I'm not able to go into your game in Edit mode...
Report Abuse
Kingslaya356 is not online. Kingslaya356
Joined: 09 Jul 2008
Total Posts: 178
05 Aug 2011 04:35 PM
What do you mean? You fixed it lol
Report Abuse
bballer13sn is not online. bballer13sn
Joined: 03 Jun 2009
Total Posts: 2490
05 Aug 2011 04:38 PM
I mean the parenting. I know I fixed it. YOU'D BEST GIVE ME COOKIEZ!!
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