I have a crate where upon touching it opens up a GUI which shows your backpack items and the items in the crate for you to take or deposit into. However, I have a certain chunk of code that checks the ReplicatedStorage so that it will move not CLONE but move an item into the chestItems. Works like a charm the first time but once a player comes to open up the chest an error says that DMR is not a valid member of ReplicatedStorage. So how do I run that code ONCE only?
if game.Lighting:findFirstChild("DMR")== nil then
local weapon = bin.DMR -- Ignore this bin.DMR:clone()
weapon.Parent = game.Lighting.Tools
end

4 comments
Try game.Lighting.Tools:FindFirstChild("DMR") == nil. You're looking through Lighting in general, not in the Tools folder/model.
Could you post the code?
Wish I could but I'm on my phone. Just change "if game.Lighting:findFirstChild("DMR") == nil then" with "if game.Lighting.Tools:findFirstChild("DMR") == nil then"
Why use FindFirstChild? Use WFC