title: Create a health bar
body: <p>I am trying to create a working health bar, and I have tried methods like </p>
  
  <ol>
  <li><p>Creating GUI.Box() that contains the health bar texture that I have created, but this makes the health bar resize to scale like this: 
  <a href="https://i.stack.imgur.com/lzB2w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lzB2w.png" alt="Distorted Health Bar"></a></p></li>
  <li><p>Resizing the texture itself <strong>without</strong> the GUI.Box(), using the <strong>Texture2D.Resize()</strong> Method, but when I used the <strong>Texture2D.Resize()</strong> method, my texture turned <strong>black</strong>. It looks like this:</p></li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/M2rM9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M2rM9.png" alt="Black Health Bar"></a></p>
  
  <p>My code looks like this. It was edited so that the irrelevant parts were deleted for ease of reading. </p>
  
  <p><a href="https://i.stack.imgur.com/iiFvI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iiFvI.png" alt="Code"></a></p>
  
  <p>Why does my health bar turn black when I resize it? Are there any ways I can prevent this from happening? Thank you in advance!</p>