Their was something wrong with my trigger volume when I made a new map. To solve the problem I just deleted it and placed another one in the map. My code was exactly like Ben’s it is just that the trigger volume did not open door for some weird reason. I checked all the objects. But problem solved when I made a new trigger volume.
Hope this helps anyone who had their maps wiped!