Hey guys i really need help with this audio source the rocket audio stay repetitive like in this video https://youtu.be/Tc1eQja4ap4
and the script
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Rocket : MonoBehaviour
{
Rigidbody rigidBody;
AudioSource audioSource;
// Start is called before the first frame update
void Start()
{
rigidBody = GetComponent();
audioSource = GetComponent();
}
// Update is called once per frame
void Update()
{
ProcessInput();
}
private void ProcessInput()
{
if (Input.GetKey(KeyCode.Space))
{
print("Empurrando");
rigidBody.AddRelativeForce(Vector3.up);
if (audioSource.isPlaying == false){
audioSource.Play();
}
else
{
audioSource.Stop();
}
}
if (Input.GetKey(KeyCode.A))
{ print("Rotate Left");
transform.Rotate(-Vector3.forward);
}
else if (Input.GetKey(KeyCode.D))
{ print("Rotate Right");
transform.Rotate(Vector3.forward);
}
}
}