So basically I'm trying to make it so when a player touches a brick it gives them a box..
This is what I have
function onTouch(hit)
if 6 > 2 then
game.Lighting["Box"]:Clone().Parent = game.Players.LocalPlayer.Backpack
wait(15)
end
end
script.Parent.Touched:connect(onTouch)
It only works in test mode and doesn't work in game... I've tried script and local script.

2 comments
I tried that and I got a blue underline saying "consider changing it to local" for line 3
That is no real issue, it's an error but does not mean the script doesn't work. Consider changing it to local means the variable is only being used once in an enclosed function. ROBLOX simply uses this to tell you you might aswell change the variable to a local variable.