This is a support category for asking questions about how to get something done on the Roblox websites or how to do something on Roblox applications such as Roblox Studio.
You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Whenever a part of a GUI or the GUI itself is visible I want it to play a sound, otherwise the sound should either stop or be destroyed.
What is the issue? Include screenshots / videos if possible!
I’ve tried multiple times and I think I am doing something wrong.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Nothing much, I just don’t know what to do
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
while true do
if script.Parent.Parent.MainMenu.credits.Visible == true then
script.MusicMain:Play()
elseif script.Parent.Parent.MainMenu.credits.Visible == false then
script.MusicMain:Destroy()
end
end
script.Parent.Parent.MainMenu.credits:GetPropertyChangedSignal("Visible"):Connect(function()
if script.Parent.Parent.MainMenu.credits.Visible == true then
script.MusicMain:Play()
else
script.MusicMain:Stop()
end)
script.Parent.Parent.MainMenu.play.Visible:GetPropertyChangedSignal("Visible"):Connect(function()
if script.Parent.Parent.MainMenu.play.Enabled == true then
script.MusicMain:Play()
else
script.MusicMain:Stop()
end
end)
script.MusicMain:Play()
script.Parent.Parent.MainMenu.play:GetPropertyChangedSignal("Visible"):Connect(function()
if script.Parent.Parent.MainMenu.play.Visible == true then
script.MusicMain:Play()
else
script.MusicMain:Stop()
end
end)