Vex V5 vision sensor detecting color but not actually working

I am working on vision sensors and trying to get the sensor to detect red and then vibrate the controller. The sensor detects the color but does not actually make the controller vibrate. Here is my code:
while (1){
if (ColorSense.objectCount > 0){

So if you have an object calibrated to the vision sensor, it should draw a shaded square around any object of that colour in the vision sensor configuration window. If it is not doing that you have a problem. Also, if you could post your entire code (including the config.cpp etc. if you are on vexcode pro), it would make it easier to fix. You also might be declaring it wrong in the while loop. I have the object declared as


but it might be different for you.

Might try a 1sec wait after the rumble to be sure it has time to execute.