Hello. Your method in doing this isnt exactly corrent. What your probably trying to do is remove, or destroy LaserGate1. To accomplish this, do the following:
2 | game.Workspace.LaserGate 1 :Destroy() |
4 | script.Parent.Touched:Connect(onTouched) |
You will see that I have replaced line 2. You were on the right track in trying to set the object to nil because what destroy does, is set the objects PARENT to nil, you were just missing the .Parent. Besides that point, :Destoy() was implemented specifically for this, thus its what I suggest you use. I hope I was able to help! ~mc3334