Basketball Score counter

I’m Making A basketball game, And My Scripts Aren’t Working!
Please Help, Its Not Counting The Points.
PS: I’m New To Scripting

#pragma strict

static var Score : int = 0;
function OnGUI () {
GUI.Box (Rect (10, 10, 100, 90), "Score: " + Score);

This Is Connected To An Empty Game Object, And Seems To Be Working.

#pragma strict

var Basket = 1;

function OnTriggerEnter (info : Collider)
{if (info.tag == "Ball")
{Score.Score += Basket;

This Is Connected To My Trigger.

Thanks A Head Of Time,

Unity Script is deprecated (C# is used now), but anyway your Ball must have “Ball” tag in this case, which can be assign in top of inspector.

Also, take a look on this complete asset: Basketball Game 3D. Hope, it helps.