Are you on a development machine or cloud app? You should look at the logs for the environment you are using to see what is causing the error. If you are running your app in Studio Pro, you’ll find the logs in the Console tab at the bottom center of Studio Pro. On the cloud platform, you can look in the Logs section.
My first guess is that the user you are logged in as does not have permission to manage users with the user role(s) of the user you are trying to create. You can set these permissions in the properties for each User Role in the App Security page:
You should have a more detailed error message in your console in Studio Pro telling you what is wrong. Take a look there and then if you are still stuck please post the error message back here and we can try to help.