Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Help with AI script

$
0
0
Hello! I am receiving an error with my script. Any tips? __I have tried adding 0,0); to the end already, and adding 0f,0f); to the end__ Script: `using System.Collections; using System.Collections.Generic; using UnityEngine; public class AIBullet : MonoBehaviour { public GameObject referenceToBulletPrefab; public float timeToWaitBetweenShots; void Start(){ InvokeRepeating("ShootBullet", timeToWaitBetweenShots, timeToWaitBetweenShots); } void ShootBullet(){ Vector3 positionToShootFrom = new Vector3 (transform.position + transform.forward*1f);` __ Error is here__ `Instantiate(referenceToBulletPrefab, positionToShootFrom, Quaternion.Euler(Vector3.zero)); } // Update is called once per frame void Update () { } } ` ERROR: `Assets/AIBullet.cs(14,34): error CS1729: The type UnityEngine.Vector3' does not contain a constructor that takes 1' arguments`

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>