You could just do:
Code:
function RetryFunction()
if not IsCollectibleActive(#) then
UseCollectible(#)
else
EVENT_MANAGER:UnregisterForUpdate("Refire")
end
function DoThat****MyDude()
UseCollectible(#)
EVENT_MANAGER:RegisterForUpdate("Refire", RetryFunction, 100)
end
Function will just keep trying every 100 ms until it gets used. Might want to put a counter variable on it too so it times out after a few seconds if not.