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

Why is my script that checks if an audio has changed not working?

Asked by
Velsity 218 Moderation Voter
4 years ago

second:

workspace.Audio.Changed:Connect(function(Change1)
    print(Change1)
end)

first script:

wait(2)
workspace.Audio:Play()

The second script never fires, does the audio not fire when the playing box has been changed?

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

It's better to use GetPropertyChangedSignal. This method returns an event that behaves exactly like the Changed event, except that the event only fires when the given property changes. You will need to change the "PROPERTY_HERE" to the property you are changing.

workspace.Audio:GetPropertyChangedSignal("PROPERTY_HERE"):Connect(function(Change1)
    print(Change1)
end)

You can find all about it here

Please accept this answer if this helped!

0
:Connect(function(Change1) Tyler090130 619 — 4y
0
Doesn't work Velsity 218 — 4y
Ad

Answer this question