Please use code tags .
In general, if you have some code that you only want to happen if the right mouse button is being held down, you can wrap it in a condition like this:
if (Input.GetMouseButton(1)) // 1 is ID for right mouse button
{
// Your code here
}