DisableControls(thread);

I wanted to use the variable "thread" instead of a boolean word