Yes that’s correct. Scripts you write are considered components as well. Remember when you write it out like:
myScript.GetComponent<script>();
you need to manually assign that component. I’m not sure what error you’re getting but it may be because you forgot to assign the script to the myScript variable. If you see an error that say something along the lines of “missing reference exception” it’s usually because something wasn’t properly assigned. If you have any other questions let me know. You can also post the error here and I’ll do my best to help explain it.