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: GUI navigation problem

Previous Thread :: Next Thread 
tamoti is not online. tamoti
Joined: 22 Mar 2009
Total Posts: 707
31 Aug 2011 09:08 AM
I have a screen GUI with a body morph button. When you click it it opens a frame with the bodies. Their are three pages, so I use a > button to go to the next page and a < button to go to the previous page.
There are four of those arrow buttons (NextPage1, NextPage2, PreviousPage1 and PreviousPage2) NextPage1 is to show the second page bodies, PreviousPage1 is to show the first page bodies again, NextPage2 is to show the thirth page bodies and PreviousPage2 is to show the second page bodies. Here is the code for each of those buttons:
---------
NextPage1
---------

function NextPage()

-- Following code is for hiding body's of the first page

script.Parent.Parent.Rob2.Visible = false
script.Parent.Parent.Super.Visible = false
script.Parent.Parent.Cool.Visible = false
script.Parent.Parent.Bro.Visible = false
script.Parent.Parent.Slinger.Visible = false
script.Parent.Parent.Roboto.Visible = false
script.Parent.Parent.Bear.Visible = false
script.Parent.Parent.Action.Visible = false
script.Parent.Parent.Basic.Visible = false

-- Following code is for showing body's of the second page

script.Parent.Parent.Alien.Visible = true
script.Parent.Parent.Pirate.Visible = true
script.Parent.Parent.Magna.Visible = true
script.Parent.Parent.Lord.Visible = true
script.Parent.Parent.DarkLord.Visible = true
script.Parent.Parent.Katana.Visible = true
script.Parent.Parent.Space.Visible = true
script.Parent.Parent.Vampire.Visible = true

script.Parent.Parent.NextPage2.Visible = true script.Parent.Parent.PreviousPage1.Visible = true script.Parent.Visible = false

end

script.Parent.MouseButton1Down:connect(NextPage)


---------
PreviousPage1
---------

function PreviousPage()

-- Following code is for hiding body's of the second page

script.Parent.Parent.Alien.Visible = false
script.Parent.Parent.Pirate.Visible = false
script.Parent.Parent.Magna.Visible = false
script.Parent.Parent.Lord.Visible = false
script.Parent.Parent.DarkLord.Visible = false
script.Parent.Parent.Katana.Visible = false
script.Parent.Parent.Space.Visible = false
script.Parent.Parent.Vampire.Visible = false

-- Following code is for showing body's of the first page

script.Parent.Parent.Rob2.Visible = true
script.Parent.Parent.Super.Visible = true
script.Parent.Parent.Cool.Visible = true
script.Parent.Parent.Bro.Visible = true
script.Parent.Parent.Slinger.Visible = true
script.Parent.Parent.Roboto.Visible = true
script.Parent.Parent.Bear.Visible = true
script.Parent.Parent.Action.Visible = true
script.Parent.Parent.Basic.Visible = true

script.Parent.Parent.NextPage2.Visible = false script.Parent.Parent.NextPage1.Visible = true script.Parent.Parent.PreviousPage2.Visible = false
script.Parent.Visible = false

end

script.Parent.MouseButton1Down:connect(PreviousPage)

---------
NextPage2
---------

function NextPage()

-- Following code is for hiding body's of the second page

script.Parent.Parent.Alien.Visible = false
script.Parent.Parent.Pirate.Visible = false
script.Parent.Parent.Magna.Visible = false
script.Parent.Parent.Lord.Visible = false
script.Parent.Parent.DarkLord.Visible = false
script.Parent.Parent.Katana.Visible = false
script.Parent.Parent.Space.Visible = false
script.Parent.Parent.Vampire.Visible = false

-- Following code is for showing body's of the thirth page

script.Parent.Parent.Thane.Visible = true
script.Parent.Parent.Zombie.Visible = true
script.Parent.Parent.Mummy.Visible = true
script.Parent.Parent.Skeleton.Visible = true
script.Parent.Parent.Werewolf.Visible = true
script.Parent.Parent.Snowman.Visible = true
script.Parent.Parent.Santa.Visible = true
script.Parent.Parent.Elf.Visible = true

script.Parent.Parent.NextPage1.Visible = false
script.Parent.Parent.PreviousPage1.Visible = false script.Parent.Parent.PreviousPage2.Visible = true script.Parent.Visible = false

end

script.Parent.MouseButton1Down:connect(NextPage)

--------
PreviousPage2
--------

function PreviousPage()

-- Following code is for hiding body's of the thirth page

script.Parent.Parent.Thane.Visible = false
script.Parent.Parent.Zombie.Visible = false
script.Parent.Parent.Mummy.Visible = false
script.Parent.Parent.Skeleton.Visible = false
script.Parent.Parent.Werewolf.Visible = false
script.Parent.Parent.Snowman.Visible = false
script.Parent.Parent.Santa.Visible = false
script.Parent.Parent.Elf.Visible = false

-- Following code is for showing body's of the second page

script.Parent.Parent.Alien.Visible = true
script.Parent.Parent.Pirate.Visible = true
script.Parent.Parent.Magna.Visible = true
script.Parent.Parent.Lord.Visible = true
script.Parent.Parent.DarkLord.Visible = true
script.Parent.Parent.Katana.Visible = true
script.Parent.Parent.Space.Visible = true
script.Parent.Parent.Vampire.Visible = true

script.Parent.Parent.PreviousPage1.Visible = true
script.Parent.Parent.NextPage2.Visible = true script.Parent.Parent.NextPage3.Visible = false
script.Parent.Visible = false


end

script.Parent.MouseButton1Down:connect(PreviousPage)

------------
I can navigate from the first bodies to the second and to the first again
I can also navigate from the first bodies to the second and to the thirth and I can go back to the second page and to the first then I can go to the second and to the thirth, but if I go to the tirth page bodies a second time I can't return to the second page. The arrow button (<) to go back is visible but if I click it nothing happens.

Srry for this long, difficult explenation but I've been trying to fix this problem for three days and I just can't see whats wrong with it.
Report Abuse
tamoti is not online. tamoti
Joined: 22 Mar 2009
Total Posts: 707
31 Aug 2011 10:02 AM
...

I'm starting to think no one knows the answer. If the text above is to long and you don't understand the problem, then you can visit my place, press the body morph button and navigate through it. You will see that when you go to the thirth page for the second time you can't go back.
Report Abuse
Lightmaster9 is not online. Lightmaster9
Joined: 14 May 2009
Total Posts: 8659
31 Aug 2011 11:16 AM
YOu can't make people switch bodies with a 'true' thingy... use all the charactermesh and make it clone into the player... :L
Report Abuse
tamoti is not online. tamoti
Joined: 22 Mar 2009
Total Posts: 707
31 Aug 2011 11:42 AM

-_-

I think you don't understand the problem. But I don't know how I can explain it better. There is no problem with the body morphs they work perfectly. The problem is showing the bodies. When you click an arrow the bodies that are visible get unvisible and some other bodies get visible. so it looks like you navigate through pages but the background stays the same only the bodies change.

So first page you see rob2.0, super, action, roboto, ... when you press the arrow > (NextPage1) you go to the "second page" and see vampire, lord, dark lord, ... when you press the arrow < (PreviousPage1) you see rob2.0, super, action, ... again. Or if you are on the "second page" you can press > (NextPage2) and go to the "thirt page" and see skeleton, mummy, santa, ... on the thirth page you can press < (PreviousPage2) to go back to the "second page" But and THIS IS THE PROBLEM!!! if you press > (NextPage2) you go to the "thirth page" but you can't go back the button PreviousPage2 doesn't works anymore if you click it. It works once but not a second time!
Report Abuse
Mahamido is not online. Mahamido
Joined: 17 Oct 2009
Total Posts: 99
31 Aug 2011 12:06 PM
TL;DR
Report Abuse
tamoti is not online. tamoti
Joined: 22 Mar 2009
Total Posts: 707
31 Aug 2011 12:13 PM
If it's too long just visit my place click on the body morph button, try it out and you will see whats wrong with it.

Then if you know whats wrong you can look at the scripts in my first thread to see whats wrong in the script.
Report Abuse
Mahamido is not online. Mahamido
Joined: 17 Oct 2009
Total Posts: 99
31 Aug 2011 12:39 PM
We don't fix free models here.
Report Abuse
tamoti is not online. tamoti
Joined: 22 Mar 2009
Total Posts: 707
31 Aug 2011 12:48 PM

-_-

It's not a free model. I'm making the screen GUI for my friend (Jeta90). If you don't believe me ask him or search for a GUI like mine in free models you'r not gonna find it.

But thx for visiting my game and trying to solve my problem.
I hope someone really can help me now because the GUI is like 95% finished only this small problem I can't solve. I don't wanna break my promise and let Jeta down.
Report Abuse
tamoti is not online. tamoti
Joined: 22 Mar 2009
Total Posts: 707
01 Sep 2011 09:14 AM
A new day, my head is cleared.
So I took another look at my scripts and saw my mistake (really dumb mistake).
At the script off the PreviousPage2 button I have a line that says: NextPage3.Visible = false
But I don't have a button called NextPage3
:3
I changed the name of that button in "close" because their isn't a fourth page.




!!! Thread's closed !!!

Thx to all people (if there are any) that read my thread and tried to find a solution!
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
01 Sep 2011 09:16 AM
Why did you bump this! >:(
Report Abuse
MasterOfDeathOnes is not online. MasterOfDeathOnes
Joined: 21 Mar 2009
Total Posts: 6975
01 Sep 2011 09:28 AM
Put the names in a table dmnt.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
01 Sep 2011 09:30 AM
How the heck are you going to switch someone body using true or false..

WHATTA HECK???
Report Abuse
ENET is not online. ENET
Joined: 01 Jan 2010
Total Posts: 4820
01 Sep 2011 09:36 AM
If they are decals then ofcourse you won't see them all the time. The game has to load them first.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
01 Sep 2011 09:41 AM
I know LOL
Report Abuse
tamoti is not online. tamoti
Joined: 22 Mar 2009
Total Posts: 707
04 Sep 2011 02:06 PM
I'm not going to switch bodies with true or false. The true or false is to make the bodies you can choose from visible.


When this thread was open nobody replied and now that the problem is solved everybody starts placing replies!

IT WORKS FINE, THE PROBLEM IS SOLVED !!!!!!!!!!!!
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