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

How do I get Children from a different Parent?

I'm making a volume slider Gui and it looks like this:

**StaterGui: **

        * ScreenGui 1:*

                    Sound ( I need this for the script) 

                    Script 1 (another script using that “Sound” also) 

         * ScreenGui 2: *

                     Frame: 

                               Script  2(The one that I’m using) 

So, how do I get that Sound to work for my second script but won't affect the first one?

1 answer

✓ Accepted answer

For Script2

local Sound = script.Parent.Parent.ScreenGui1.Sound
--[[             ^      ^        ^          ^ 
            Script2 ScreenGui1, PlayerGui, ScreenGui1, the sound
]]

1 comment

1

Oh my, thank you for your help <3. I also had to add another Parent because the script is in a frame.

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