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

Trying to make the song not play whilst the audio is inside of StarterGUI, help?

while true do
	wait(.1)
if script.Parent.Parent == StarterGui
	then script.Parent.Playing = false
end


if script.Parent.Parent == PlayerGui
	then script.Parent.Playing = true
end
end

1 answer

✓ Accepted answer

There is a much simpler solution to this. Because LocalScripts only run in the Player, NOT the server, have the audio default as Playing = false. Then, in the local script, simply put

script.Parent.Parent.Playing = true

So when the player gets the audio, it immediately toggles it to start playing. Hope this helps!

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