I change the Z index of a text box and it won't appear in front of the frame I want instead it appears behind it.
In roblox gui's everything that is created FIRST, gets rendered FIRST. (If you'd create 2 frames, the 2nd frame would be rendered "on top" / "over" of the first one.)
I have to admit, Roblox's Z-Index is pretty bad, though it has its functionality.
Everything has to be inside the SAME ScreenGui for it to have a good effect.
How it works:
--[[ Structure: Frame1 - ZIndex 1 -Frame2 - ZIndex 1 --TextButton - ZIndex 1 Foreground / view order: TextButton Frame2 Frame1 ----------- Structure: Frame1 - ZIndex 1 -Frame2 - ZIndex 2 --TextButton - ZIndex 1 Foreground / view order: Frame2 TextButton Frame1 ----------- Structure: Frame1 - ZIndex 2 -Frame2 - ZIndex 1 --TextButton - ZIndex 2 Foreground / view order: TextButton Frame1 Frame2 ]]
@RubenKan Thank You for all your help. If it weren't for you I wouldn't have bumped into this! For every one having my problem of putting frames and GUIs behind and in front of each other, use the** DisplayOrder** property in your ScreenGUI!!! The higher the property the more front it will go and the lower the property, the more behind it will go!
http://wiki.roblox.com/index.php?title=API:Class/ScreenGui/DisplayOrder