SoundResumed

Constructor:

SoundResumed()

Description

This event is triggered when the paused audio object is played.

Examples

Create an Audiosource player. Assign the audio path to the player to play, and pause it 2 seconds later. Observe whether the event that the paused audio is played is triggered or not.

function SoundEvent() -- define the method that the paused audio is played
    print("The event of pausing and resuming playing is triggered")
end
local AS = RWObject.Create("AudioSource") -- create a player
AS.PlayOnAwake =false
AS.AudioClip = "rwid://L1vtZTBThT1RCvBVdK"  -- assign a path
AS.SoundResumed:Connect(SoundEvent) -- register the event that the paused audio object is played
AS:Play() -- play the audio
wait(2) -- wait 2
AS:Pause() -- pause the audio
wait(2) -- wait 2
AS:Play() -- play the audio