Cold sore

My tooth is hurting so bad but I woke up with a cold sore, will I still be able to go to the dentist???