Rigidbody enemy Forcemode.VelocityChange

Hello there, I am trying to make a simple enemy that looks and chases the player with a constant velocity using Rigidbody ForceMode.VelocityChange, at the begining it works well but for some reason the enemy follows another direction, what am I doing wrong?!


var velo = 1.0;

function FixedUpdate () {

   var Player = gameObject.FindWithTag("Player").transform;

   rigidbody.AddRelativeForce(transform.forward * velo, ForceMode.VelocityChange);


try using
instead of that long line
alsi use Vector3.forward instead of transform.forward (though it might not make a difference)

the script would be:
var velo : float = 1.0;

function FixedUpdate () 
   var player = gameObject.FindWithTag("Player").transform;

   rigidbody.AddRelativeForce(Vector3.forward * velo, ForceMode.VelocityChange);


If this won’t work tell me :wink: