How would I save my players data when they leave

You can just use profileservice to make your life easier. There are several tutorials on youtube for it.