The second code sample documented on the Instance:FindFirstChildWhichIsA function page is lacking an = operator.
Issue lies on line 1 of the second code sample, where object:FindFirstChildWhichIsA("BasePart")
is meant to be assigned to the variable part
.
Code sample
local part object:FindFirstChildWhichIsA("BasePart")
Result
Fix: local part = object:FindFirstChildWhichIsA("BasePart")