FindFirstOf

The FindFirstOf function will find the first non-default instance of the supplied class name.

This function cannot be used to find non-instances or default instances.

Parameters

#TypeInformation
1stringShort name of the class to find an instance of

Return Value

#TypeInformation
1UObject, UClass, or AActorObject is only valid if an instance was found

Example

local CharacterInstance = FindFirstOf("Character")
if not CharacterInstance:IsValid() then
    print("No instance of class 'Character' was found.")
end