Script not working

local RarityFrame = PetHatchedUi.RarityFrame

local rarityValue = RarityFrame:WaitForChild("rarityValue")
local rarityValue2 = RarityFrame:WaitForChild("rarityValue2")
if rarityValue.Name == rarityValue then 
	RarityFrame.Text = "Commom"
	

	
elseif rarityValue2.Name == rarityValue2 then 
	RarityFrame.Text = "Commom"
end

16:32:51.326 Infinite yield possible on ‘Players.mariyandog999.PlayerGui.PetHatchedUi.RarityFrame:WaitForChild(“rarityValue”)’ - Studio

The warning means that the Instance didn’t load in and/or doesn’t exist. Are you sure it exists during runtime?