OnTouched Function

The onTouched function involves making the brick do something if the block is touched.

Instructions
The first step is to do this following function, then ROBLOX Studio will automatically add the "end" function for you. function onTouched(hit) The 2nd step is to add the variable which will make the entire script work script.Parent.Touched:connect(onTouched)

Other commands
If you add the hit. variable, then the object who is touching it will be affected as well.