Luduvo Contents
Theme

Component

the fields of one component, read and written by name

Writing the Fields of a Component

Lifecycle: Server

A component the place declares hands back a proxy whose fields are written by name, whereas a built-in component hands back the instance itself.

Luau
local crate = game.Prefabs.Spawn("Crate")if crate then	local loot = crate:AddComponent("LootTable") :: Component	loot.Tier = 2	loot.Rolls = 3	print("Loot attached to:", crate.Name)end
Output: Loot attached to: Crate