如何在弹出的警报按钮上获取音频?

时间:2019-07-12 12:56:12

标签: button audio alert

我有一个“接受”警报按钮,当新聊天进入该站点时会弹出。我正在尝试使该按钮弹出时发出声音警报,因此我们知道有传入的聊天等待被接受。到目前为止,我只有在单击“接受”时才使它响起,而当第一个弹出时却没有。

这是按钮的代码

while true do
    if script.Parent.Parent.LightStatus.Value == 1 then
        script.Parent.Material = "Neon"
        script.Parent.PointLight.Enabled = true
        script.Parent.SpotLight.Enabled = true
    else
        script.Parent.Material = "SmoothPlastic"
        script.Parent.PointLight.Enabled = false
        script.Parent.SpotLight.Enabled = false
    end
    print(script.Parent.Parent.LightStatus.Value)
    wait(1)
end

0 个答案:

没有答案