๐Ÿ”น 1. wait(seconds)

Pauses the script for a certain number of seconds (optional).

lua
CopyEdit
print("Wait 2 seconds...")
wait(2)
print("Done waiting!")

๐Ÿง  Use this in loops or to delay actions.


๐Ÿ”น 2. print(value)

Prints something to the Output window for debugging.

lua
CopyEdit
print("Hello, world!")
print(myVariable)

๐Ÿง  Use this all the time when debugging.


๐Ÿ”น 3. Instance.new(className, parent)

Creates a new object (like a Part, Light, GUI).

lua
CopyEdit
local part = Instance.new("Part", game.Workspace)

๐Ÿง  You use this to build stuff with code.


๐Ÿ”น 4. :WaitForChild("ChildName")

Waits until a child object is available. Safer than directly calling .ChildName.

lua
CopyEdit
local player = game.Players.LocalPlayer
local char = player:WaitForChild("Character")

๐Ÿง  Prevents errors when something isnโ€™t fully loaded yet.