Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

what does hit mean in this script?

function onTouched(hit) what does hit mean ? exactly It would help if someone would explain why I need that... Thanks

1 answer

✓ Accepted answer

Hit is basically what is hitting whatever is touching the brick for example

function onTouch(hit) -- whatever touched the part is hit
if hit.Parent.Name = "CircularSquare" then -- if the name of what touched the part is CirculatSquare the code will continue
script.Parent.CanCollide = false 
wait(1)
script.Parent.CanCollide = true
end
script.Parent.Touched:connect(onTouch) -- script.parent is a part

This discussion is preserved as it was. New answers, comments, and votes are closed.