Skip to main content

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 ScriptingWith Scripting
Predefined animationsDynamic, data-driven motion
Fixed interactionsComplex game logic
Static layoutsResponsive, procedural layouts
Limited user InputFull interactivity

Choose Your Pathโ€‹

This course is designed for different experience levels. Choose the path that fits you best:

๐ŸŒฑ New to Programming?

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.

๐Ÿ’ป Have Programming Experience?

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 ExpressionsRive Scripts
Single-line or block of codeStructured with lifecycle functions
value + [100, 0] just runsCode runs inside init(), advance(), draw()
Access props via thisComp, thisLayerAccess data via self parameter
Expressions recalculate each frameFull control over when code runs
No drawing capabilitiesFull procedural drawing API
wiggle(), linear() built-inWrite your own utils (or use libraries)
Limited to property valuesCan 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โ€‹

Q:What does Rive scripting enable that State Machines alone cannot?
Q:What tool is built into the Rive Editor to help with scripting?

Next Stepsโ€‹

Choose your path: