hi i have made a scripts for bombs.there are 3 of them.so when i have at least one bomb picked up and i havent laid a bomb I can instantiate it and it destroys enemies nearby.So i have script for bomb,bomblaid and pickupbomb.I defined bomblaid in bomb script but everytime when i trry to acces is by doing laybomb.bombLaid = false; it says object not set to an instance so yeah i could use some help.
You Should have to use composition here.
First make instance
_bomb.bombLaid = false;
Then assign Reference to laybomb in hierarchy or find reference by type.