Bullet don't collide (C#)

i’m trying some tutos on how to make games, got this one really easy but it’s written in JavaScript, and for some reason i preffer C#, idk maybe translating to C# with nothing but my brain will help me memoryze the sytax…; nvm

the point is that i can’t make the bullet collide with the sphere and give me score

This is the original code in JavaScript:

function OnTriggerEnter(otherObject:Collider){

          if(otherObject.gameObject.tag =="enemy"){
			
			playerScript.playerScore += 100;

          }
}

and this is what i’ve translated to C#:

void OnTriggerEnter(Collider otherObj){

    if(otherObj.gameObject.tag =="Enemy"){
			
    PLayer.playerScore += 100;
    }
}

i’ve tryed whith and eithout rigidbody on “enemy” and i get nothing in both situations,

thx anyways

PS: unity doesn’t give me any errors

edit:
Here follows my codes:

Bullet:
using UnityEngine;
using System.Collections;

public class Bullet : MonoBehaviour 
{
	
	public float bulletSpeed;
	float bulletMove;
	Transform explsion;
	
	public int score;
	// Use this for initialization
	void Start () 
	{
		
	}
	
	// Update is called once per frame
	void Update ()
	{
		bulletMove = bulletSpeed*Time.deltaTime;
		transform.Translate(Vector3.up*bulletMove);
		
		if(transform.position.y>=7)
		{
			Destroy(gameObject);
		}
	}
	
	
	void OnTriggerEnter(Collider otherObj)
	{
		if(otherObj.gameObject.CompareTag ("Enemy"))
		{
			
	
			PLayer.playerScore += 100;
			Destroy(this.gameObject);
		Destroy(otherObj.gameObject);
		}
		
	}
}

PLayer:

using UnityEngine;
using System.Collections;

public class PLayer : MonoBehaviour {
	
	public int playerLives;
	public float playerSpeed;
	float amtToMove;
	public Rigidbody bullet;
	
	static public int playerScore;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
		amtToMove = (playerSpeed*Input.GetAxis("Horizontal"))*Time.deltaTime;
		transform.Translate(Vector3.right*amtToMove);
		
		if(Input.GetKeyDown("space")){
			Instantiate(bullet, transform.position,transform.rotation);
			
		}
	}
	
	
	
	void OnGUI(){
		GUI.Label(new Rect(10,10,200,50),"Score: "+playerScore);
		GUI.Label(new Rect(10,30,200,50),"lives: "+playerLives);
		
		
	}
}

enemy:

using UnityEngine;
using System.Collections;

public class Enemy : MonoBehaviour {
	
	public float enemySpeed;
	float enemyMove;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		
		enemyMove = enemySpeed*Time.deltaTime;
		transform.Translate(Vector3.down*enemyMove);
		
		if(transform.position.y<=-5){
			transform.position=new Vector3(Random.Range(-6,6),7,0);
			
		
			
		}
	
	}
}

i think that, somehow, i’m missusing the Collider, for it don’t give me any scores and don’t destroy nehither the enemy, nor the bullet itself on collision

In one version of the script, you have it looking for the tag “Enemy” (capital E) and in the other it’s looking for “enemy” (lowercase e). Make sure that you actually do have the enemy tagged

Also, in one script you have “playerScript.playerScore” and in the other you have “PLayer.playerScore” If you’re trying to do a strait conversion, it should be the same.

first of all, ty man

the tag is actually right (with capital E), so is the player script name, my script to player is “PLayer” with capital P AND L.

i’ve checked more than 10 times. the error isn’t in there. i’m wondering if there is another syntax that i use to do the same thing (for i tryed to use javaScript’s transform.position.y=float value didn’t worked for me in C# script, so i had to change to transform.position=Vector3).

i googled the issue but i can’t seem to find anything that i can use (maybe lack of information in my head, but still i can’t find).