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

What the heck is going on with this?

script.Parent.SoundFX:Play()

I have a local script inside of a Frame in a PlayerGui. A sound named "SoundFX" is inside of the PlayerGui as well, but for some reason it keeps saying that SoundFX is not a valid member of Frame. It works offline, but testing online gives me the error. Help?

1 answer

✓ Accepted answer

Use WaitForChild

I cannot stress the importance of WaitForChild enough to people.

script.Parent:WaitForChild("SoundFX"):Play()

It is super important, especially inside of PlayerGui.

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