local part = workspace:WaitForChild("MyPart")local button = workspace:WaitForChild("Button")workspace:WaitForChild("Door")local door = workspace.House:WaitForChild("Door")local house = workspace:WaitForChild("House")
local door = house:WaitForChild("Door")local part = Instance.new("Part")
part.Name = "MyPart"
part.Parent = workspacelocal part = workspace:WaitForChild("MyPart")local part = workspace:FindFirstChild("MyPart")if part then
print(part.Name)
else
warn("MyPart не найден")
endInfinite yield possible on 'Workspace:WaitForChild("Door")'local part = workspace:WaitForChild("MyPart", 5)local part = workspace:WaitForChild("MyPart", 5)
if part then
print("Объект найден")
else
warn("MyPart не найден")
endlocal door = workspace:WaitForChild("Door")