Assigning random numbers to variables in the awake function

using UnityEngine;
using System.Collections;

public class Treestuff : MonoBehaviour {
	public float treeenergy;
	public float treeleaves;
	public float leafsize;
	public float treehieght;
	
	void Awake () {
		float treeenergy = 15;
		float treeleaves = Random.Range(1,100);
		float leafsize = Random.Range(1,100);
		float treehieght = Random.Range(1,100);
	}
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}
}

This is what I have so far and I’m fairly new, so I have no idea what is wrong. All I know is that when the game starts, the variables are not assigned random numbers with a rang of 1-100.

Replace:

float treeenergy = 15;
float treeleaves = Random.Range(1,100);
float leafsize = Random.Range(1,100);
float treehieght = Random.Range(1,100);

With:

treeenergy = 15;
treeleaves = Random.Range(1,100);
leafsize = Random.Range(1,100);
treehieght = Random.Range(1,100);

The code you have is redefining (remaking) the variables in question. Removing the type syntax (in this case, ‘float’) will retrieve the already defined variables by those names.