MenuGui is not a valid member of PlayerGui "Players.GabinoRBLX.PlayerGui"

Hey there, I’m trying to make a LocalScript activate a sound. This is what it looks like when running the game:

image

The local script in LoadingGui is the one giving me this error.

image

This is what the script looks like:

local sound = script.Parent.Parent.MenuGui.Sound
wait(7)
sound:Play()

To me, it appears that MenuGui is a valid member of PlayerGui. Am I missing something?

1 Like

I believe it’s giving you an error because its starting the script before MenuGui is loaded, so your going to need to make the script wait for it to load in.

 local sound = script.Parent.Parent:WaitForChild("MenuGui").Sound
wait(7)
sound:Play()
2 Likes