Just a quick question about a function name

Hi,
Question: What means “on” in a function variable???
Example:

function onTouched()
    -- mi function
end
1 Like

It’s just the name of the function. You don’t HAVE to keep it.

1 Like

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

1 Like

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

1 Like

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

1 Like