Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[SOLVED] Layering GUI objects?

EDIT: Apparently it's as simple as re-parenting the GUI objects in order, which worked great. Odd...

Hi everyone, I've successfully made a GUI to hold all my game's cards, but I need to layer them in a certain order.

I am wanting to make it so that the card that is furthest to the left is on top of all the rest, the second furthest card to be on top of everything except the first card, etc. I am unsure of how to do this as ROBLOX seems to layer my GUI objects by the time they're created. (See here.)

How could I go about doing this? I am assuming I need to use ZIndex but I am sure that ZIndex wouldn't work for 17 GUI objects.

Any help is appreciated, thanks

2 comments

0

Oddly enough, I can usually get GUIs to overlap just fine while they all have the same Zindex's. I never even need to bother editing that property. This doesn't make sense, but try it.

0

Yeah, all of my card frames are the exact same ZIndex, but it's layering them by the time they were created (or it could be the name). My first card is in the middle, my second card is to the right of the first one, my third is to the left of the first one, etc. (See the picture in the link above.)

1 answer

This is really simple, You were actually right.

Use the ZIndex, You can use the ZIndex how many times you'd think off.

So that'd be like this:

card1.ZIndex = 1 card2.ZIndex = 2 card3.ZIndex = 3 And so on.

2 comments

1

If I remember correctly, ZIndex only goes from 0 to 10

0

@mu Yeah, that's the only problem. "The ZIndex only accepts positive integers between 1 and 10, and 0."

This discussion is preserved as it was. New answers, comments, and votes are closed.