Welcome to Rive Scripting
Rive is a powerful tool for creating interactive graphics that run anywhere. Traditionally, Rive animations are driven by Timelines and the State Machine, which are excellent for predefined motion and transitions.
However, complex interactivity, procedural generation, dynamic layouts, and game logic often require programmatic control.
What Scripting Enablesโ
Rive Scripting allows you to embed code directly within the Rive Editor, executing logic in real-time alongside your designs. This bridges the gap between design and development.
| Without Scripting | With Scripting |
|---|---|
| Predefined animations | Dynamic, data-driven motion |
| Fixed interactions | Complex game logic |
| Static layouts | Responsive, procedural layouts |
| Limited user Input | Full interactivity |
Choose Your Pathโ
This course is designed for different experience levels. Choose the path that fits you best:
Start here: Your First Rive Script
We'll teach you programming concepts from scratch - no prior experience needed. You'll learn what variables, functions, and types are before diving into Rive-specific concepts.
Start here: How Rive Scripts Work
If you know JavaScript, TypeScript, or After Effects expressions, this page maps Rive concepts to what you already know. Get up and running faster with side-by-side comparisons.
Both paths lead to the same place - you can always reference the other track if you want more detail or a different perspective!
Coming from After Effects?โ
If you've used AE expressions, here's how Rive scripting compares:
| After Effects Expressions | Rive Scripts |
|---|---|
| Single-line or block of code | Structured with lifecycle functions |
value + [100, 0] just runs | Code runs inside init(), advance(), draw() |
Access props via thisComp, thisLayer | Access data via self parameter |
| Expressions recalculate each frame | Full control over when code runs |
| No drawing capabilities | Full procedural drawing API |
wiggle(), linear() built-in | Write your own utils (or use libraries) |
| Limited to property values | Can create new shapes, respond to events |
Key difference: AE expressions modify property values. Rive scripts can do that AND create entirely new graphics, handle multi-touch, manage game state, and more.
The Rive AI Coding Agentโ
Rive includes an AI Coding Agent built directly into the Editor. This assistant can help you with scripting, animation, layout, and more โ no API keys, external apps, or setup required.
What it can do:
- Create new scripts from natural language descriptions
- Edit and refactor existing code
- Debug issues by analyzing your code and reading console output
- Create and modify animations and state machines
- Build flexbox layouts
- Manage ViewModels and data bindings
- Create shapes with paths and paints
- Run tests and check for diagnostics errors
The AI agent has access to 14 specialized tools that let it interact with nearly every part of the Rive editor. It understands the full Rive Luau API and can generate correctly-typed code that works with your Artboards and ViewModels.
Learn more: Rive AI Agent Guide โ
Knowledge Checkโ
Next Stepsโ
Choose your path:
- ๐ฑ Beginner: Your First Rive Script - Learn from scratch
- ๐ป Experienced: How Rive Scripts Work - Fast-track with comparisons
- ๐ค Curious about Luau? Why Luau? - Learn why Rive chose this language
- ๐ Need a reference? Quick Reference