Hi,
Question: What means “on” in a function variable???
Example:
function onTouched()
-- mi function
end
Hi,
Question: What means “on” in a function variable???
Example:
function onTouched()
-- mi function
end
It’s just the name of the function. You don’t HAVE to keep it.
It’s just a function name, nothing really special happens if you include on
or not, it’s just has a bit of description as to what the function does/when it is used
So why people use it? It doesn’t make sense to me
Again, it’s just to add a bit of descprtion to the function, it shows the programmer and readers that the function is used when something is touched, such as connecting it to the Touched
event
It seriously doesn’t matter. I could just do this:
function Cheeseburger()
end
And it’d have the exact same effect. It just keeps your code neat and understandable