GameObject problem

In my scene I’ve an object with the HingeJoint, but If I Build the game, this object dosn’t appears…and the game is very slow! and if I remove the HingeJoint from this object the G.Objects appears, and the game is fast… why? In Play (in unity editor) it’s all right!..

Maybe the settings of the HingeJoint are strange?
I took a pic:

This is the script:

#pragma strict

var amount = 5.0;
function Awake ()
 rigidbody.velocity = rigidbody.velocity * 0.0;

function Update()
   if (Input.GetKey(KeyCode.R)) {
      rigidbody.AddForce(transform.right * amount);
   else if (Input.GetKey(KeyCode.T)) {
      rigidbody.AddForce(-transform.right * amount);
   else if (Input.GetKey(KeyCode.Y)) {
      rigidbody.velocity = rigidbody.velocity * 0.9;

Sorry for my bad english, I hope someone can help me!

Don’t mess with velocity. In real world, you can’t change the velocity of the objects. You can only apply them a force. It’s same in Unity. See this page : Unity - Scripting API: Rigidbody.velocity

  1. You don’t have to set the velocity to zero on awake event. Remove that line.
  2. Don’t use velocity in KeyCode.Y case. Use AddForce just like in the other key cases.

I’m not sure if this is gonna solve your problem but this is gonna solve the other problems you have already.