title: How do I use multiple If's in Lua?
body: <p>I'm trying to make a UFO in my ROBLOX place, and wanted to create a system that would play an audio when the UFO passes overhead. I created a part, inserted an audio into the part, then placed a script within the part. So it looks like:</p>
  
  <p>Part->Audio->Script</p>
  
  <p>I plan the system to register when a Humanoid is touched, and if the part is going faster than say, 300 Studs per second, I want it to play an audio (preferably the audio would be played only for the person(s) that was touched by the part) so I wrote a script that goes as follows:</p>
  
  <pre><code>while true do
  if script.parent.parent.Velocity.Magnitude&gt;299 then 
      script.Parent:play()
      wait(5)
      script.Parent:stop()
  else
      wait()
  end
  wait()
  </code></pre>
  
  <p>end</p>
  
  <p>As you can see I'm missing the part about the humanoid being touched, but I'm not sure how to write that. I'm really new to scripting, and I don't know the proper context for these commands(?). Help would be greatly appreciated.</p>
  
  <p>Thanks!</p>