Question by
Lindseya255 · Jun 12, 2018 at 11:47 PM ·
errorscripting beginnererror-messagereloadfix
Weapon Reload script error
So.. I have an animation called "reload" and I have a short script to start the animation when "R" is pressed..
can someone help me? here is my code:I keep getting the ERROR CS1061 saying: Type 'UntiyEngine.Component' does not contain a >>definition for 'Play' and no extension method 'Play'
public class reload : MonoBehaviour { public bool animation_bool; // Use this for initialization void Start () { } // Update is called once per frame void Update () { if(Input.GetKeyDown("R")) { animation_bool = true; } if(animation_bool == true) { animation.Play("reload", PlayMode.StopAll); } } }
Comment