What does return do?

Here is an example from my script. I wrote this myself lol but I don’t see why I have to use return

function KnockBack()
	var knock : Vector3 = Vector3 (-4,6,0);
	return transform.TransformDirection (knock);

Return simply as implied returns some result when the function is called. Return is not always needed and can be voided, by the use of making the function of void type.

you can have void function KnockBack()

Your function will return the result you place after the return keyword whenever the function is called.