Scripted Audio in Rive: Play, Stop, and Volume Control
Rive's Luau scripting gives you real programmatic control over audio — triggered playback, dynamic volume, seeking, looping, and more. This video walks through building an audio script from scratch: setting up an audio source, creating play and stop triggers, wiring up live volume control, and making the script reusable across multiple sound assets and nodes. The simple demo barely scratches the surface of what scripted audio unlocks. In this video:
Understanding AudioSource vs AudioSound — the two core concepts
Setting up play and stop triggers using Luau script inputs
Controlling volume dynamically with a number input (including a 0–100 scaling trick)
Making the script reusable by passing the asset name as a string input
Running multiple independent audio nodes from the same script
Timeline-keying audio triggers for synced playback
Preview of the upcoming audio tool on the Rive marketplace
Find this completed file on the Rive Marketplace: https://rive.app/community/files/26986-50750-scripted-audio-play-stop-volume/ Check out the Scripted Audio Tool in the Rive Marketplace: https://rive.app/community/files/27027-50867-scripted-audio-tool/