Harassed at the Gym/Workplace

I was working at a fitness institute as a part-time worker, and a really creepy guy was working alongside me. One day while I was getting supplies from the storage room, he saw me inside and came in. He closed the door behind him and locked it. I had no idea what to make of the situation, so I threatened to scream as loud as I could, he took a step forward and I raised my voice even higher, knowing the gym members could hear my voice. He eventually opened the door and I ran out.