I tried a test object map and associated it to the script but when i try to access teh objects from the map, it showing in red. Whereas if I go to object map, right click the object and add it ti the script. Then it appears in the right side and I can use it in the script.

Is it how it should behave or did I miss something?