Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

play sound at certain value?

Asked by 6 years ago
Edited 6 years ago

im trying to play a sound when a value is equal to or greater then something but when i play the game the audio plays and doesn't work after Code:

temp = workspace.Values.Temp audio = workspace.Values.Audio

wait(1)
temp.Changed:connect(function()
    if temp.Value < 3449 then
        audio.TempWarning:Play()
    elseif temp.Value > 3500 then
        audio.TempWarning:Stop()
    end
end)

1 answer

Log in to vote
0
Answered by
GingeyLol 338 Moderation Voter
6 years ago
Edited 6 years ago

use game.Workspace, local temp, local audio and use a normal script

wait() will malfunction

Ad

Answer this question