Rotate an Object

Hello Unity3D.I have a question about rotating an object.How can i rotate an object from another object?For example.I want my character summon an orb and then i want that orb to rotate or orbit around the character.that summoned the orb.If anyone knows how i can do this?Can you please tell me how?I can;t seem to find it

on the orb objects attach a script that has this

public Transform targetObject; // your player
	Vector3 rotationMask = new Vector3(0, 1, 0); 
	public float rotationSpeed = 5.0f;

void Update()
{
   transform.rotateAround(targetObject.transform.position, rotationMask, rotationSpeed * Time.deltaTime);
}