roblox-api-patterns

Installation
SKILL.md

Roblox API Patterns & Gotchas

When working with Roblox APIs, be aware of these platform-specific behaviors and patterns.

Common Gotchas

Instance.new() - Set Parent Last

-- BAD: Setting parent first causes events to fire during setup
local part = Instance.new("Part")
part.Parent = workspace  -- Events fire here!
part.Size = Vector3.new(5, 5, 5)  -- Property changes after parenting

-- GOOD: Set all properties, then parent
local part = Instance.new("Part")
part.Size = Vector3.new(5, 5, 5)
part.Position = Vector3.new(0, 10, 0)
part.Anchored = true
part.Parent = workspace  -- Only fires events once, fully configured
Installs
2
First Seen
Jan 25, 2026
roblox-api-patterns — taozhuo/game-dev-skills