Edit: Wrote this before I saw that you responded!
Also, just a little comment here! I kinda felt like I wanted to help out a little, so I wrote out some code that would help out with the problem with walking off the edge of the map and falling forever.
It's not an extremely complicated script, nor is it long, but if you're interested, I linked the code here with a few instructions on how to use it.
I hope this helps!