That's because "Handle" is the argument of the function, meaning that whatever touches TryArea1 will be the one manipulated by the function (if you let it).
A function's parameter (whatever is in the parenthesis) can be name as whatever you want it to be.
function Example(argument)
end
function Example2(dfjkdslfjaksda)
end
function Example3(omgomgwowwhy)
end
But, of course, if you want something done to the argument, make sure capitalization and spelling are exact.
function Example(argument)
print(argument*2)
end
function Example2(dfjkdslfjaksda)
print(dfjkdslfjaksda)
end
function Example3(omgomgwowwhy)
print(omgomgwowwhy+omgomgwowwhy+omgomgwowwhy)
end
function RelayTheExamples()
Example("I like cookies.")
Example2("What's 9 + 10?")
Example3(7)
end
script.Parent.Touched:connect(RelayTheExamples)
OUTPUT:
I like cookies.
What's 9 + 10?
21
If you want to only send a print of the handle, use an 'if' statement.
workspace.TryArea1.Touched:connect(function(Handle)
if Handle.Name == "Handle" then
print(Handle)
else
print("fail")
end
end)
What the If Statement is Doing:
If the name of the handle is "Handle", then print "Handle"; otherwise, print "fail".
NOTE ON THE UPDATE
The argument can't be accessed outside of the function. "otherPart" will return an error because it is an unknown global variable.