Mute button not working after using :music command

I would default to just using “workspace” to reference it. but it looks as if the instance is being added after removed or just added, and it’s referenced before it even exists. Try Referencing it in the connection.

script.Parent.MouseButton1Click:Connect(function()
    local music = workspace:WaitForChild("ADONIS_SOUND")
	if music.Volume == 0 then
		music.Volume = 1
	else
		music.Volume = 0
	end
end)
2 Likes