If function runs Both?

So I tried this for my game to set Values:

function RandomNeeds()
	
	if game.Workspace:WaitForChild("GameStoring").SaveData.FoodServing.Value == true then --Randomize between coffee and Food
		local CoffeeFood = math.random(1,2)
		
		if CoffeeFood == 1 then
			RandomCoffeeNeeds()
		else
			RandomFoodNeeds()
		end
	
	else
		RandomCoffeeNeeds()
	end
	
end

But it runs both so Multiple Values are set through those functions? Any Ideas why, Really need ya help, Thanks! :slight_smile:

End the function once a sub-function (eg. RandomCoffeeNeeds) runs.

function RandomNeeds()

	if game.Workspace:WaitForChild("GameStoring").SaveData.FoodServing.Value == true then --Randomize between coffee and Food
		local CoffeeFood = math.random(1,2)

		if CoffeeFood == 1 then
			RandomCoffeeNeeds()
			return
		else
			RandomFoodNeeds()
			return
		end

	else
		RandomCoffeeNeeds()
	end

end

Doing this will ensure the function will stop once you run a mini function