You probably have to define the gotoquiz1 object as a script before it can associate the right property (score in your case) with it. Try adding this to script B and assigning script A to it in the inspector:
var gotoquiz1 : Gotoquiz1; // you said that’s your script, right? Gotoquiz1.js?
Now assign that with the Inspector by dragging the object containing Gotoquiz1.js onto that exposed variable.
Or,
function Start()
{
gotoquiz1 = GetComponent.<Gotoquiz1>(); // if the script is on the same object
OR
gotoquiz1 = GameObject.Find("otherobject").GetComponent.<Gotoquiz1>(); // if the script is on the 'other object'
}