Scripts are plain text files that let you add custom, dynamic behavior to your experiences. You can use scripts to trigger in-game events, respond to player input, save player data, create leaderboards, spawn enemies, control NPC behavior, and much, much more.This section is for creators with some coding experience who want to know the specifics of scripting in Roblox.If you've never written code before and want an introduction to programming, see Coding Fundamentals, which covers concepts like variables, functions, conditionals, loops, and arrays. For a more guided, step-by-step approach, see the Basic Gameplay tutorial.LuauRoblox scripts use the Luau programming language, which is derived from Lua 5.1.Compared to Lua 5.1, Luau adds performance enhancements and many useful features, including an optional typing system, string interpolation, and generalized iteration for tables.All valid Lua 5.1 code is valid Luau code, but the opposite is not true.Most books and online resources for L...