If Game Component Exists Can You Get Info From it without Custom Property Reference?

Trying to create something for my own game but also make it available for others in CC. I want to make it smart depending on if a game component exists or not.

Here is the scenario. I have the following code. It will detect for 3 players before starting the round...

local gameState = "LOBBY"

print("Waiting for 2 players to join...")

function OnRoundStart()

    gameState = "PLAYING"

    print("New round starting...")

    Events.BroadcastToAllPlayers("placeHealthBarsOnce", placeHealthBarsOnce)



function Tick()

    if gameState == "LOBBY" then

        -- The condition for starting a round

        local playerCount = #Game.GetPlayers()

        if playerCount >= 3 then





However, in my game I already have the "Lobby Required Players" component where you can set the required players count. IF that component is present I would like to get the required players number from the customer properties of the component called RequiredPlayers. If not, then I will just use the hand coded number.

Is there a way to look for the component and getting the RequiredPlayers number without having to add the component to the custom properties of my script?

Here is a quick video for a more detailed explanation if the writing above did not share the goal well.

As always, thanks for the help!

After testing a bit more it looks like the Lobby Required Players is a must. It is triggering the round start properly whereas the code previously mentioned is not always triggering properly. Super weird. I am not really sure why my broadcast is not working when I remove the Lobby Required Players Component. Have a look. I want to understand the "why" behind it and cannot quite wrap my head around it...

Video of testing