What defines the criteria for WaitForObject?

I've been editing the Team Death Match project example, adding some extra customProperties to the Player UI for picked up and carried gold.

I've noticed that the for custom properties I've added the suggested code snippet does not include waitForObject (e.g)

local propAPI = script:GetCustomProperty("API")
local propComponentRoot = script:GetCustomProperty("ComponentRoot"):WaitForObject()
local propTextBox = script:GetCustomProperty("TextBox"):WaitForObject()
local propProgressBar = script:GetCustomProperty("ProgressBar"):WaitForObject()
local propAmmoPanel = script:GetCustomProperty("AmmoPanel"):WaitForObject()
local propAmmoText = script:GetCustomProperty("AmmoText"):WaitForObject()
local propGoldPanel = script:GetCustomProperty("GoldPanel") -- my addition
local propGoldText = script:GetCustomProperty("GoldText") -- my addition

I suspect there is config attribute somewhere?

It seems when you add the customProperty it needs to be set to object reference

Also, the object that it references needs to be dragged into the box

@SeniorCoolio is correct. WaitForObject is required on properties that are of type "Core Object Reference".

The reason for this is if you have two objects in your game, that reference each other. When object A has been created, object B may not yet exist, and thus the WaitForObject needs to be called to ensure the variables are assigned at a time after the object has been created in the hierarchy.

However, scripts and templates, integers bools etc are not "Game Objects" and does not requires this.