Player won't respawn after death if mod is running

Hey everyone,

I am learning how to create C# mods and I followed the tutorial at Creating your first script in C# - Cfx.re Docs. When I manually start the mod after the server is loaded and I’m in the game, it works with no issues. The problem is when I die it does not respawn my character. The same holds true when I disconnect and reconnect or set it to load in the cfg file. The little turning icon at the bottom right just keeps spinning after I die. I had another person try joining with the same result. I looked at the logs and I’m getting:

tried to spawn at an invalid spawn index

I removed everything from my code so it’s just a empty class with the same results. Here it is:

  using System;
  using System.Collections.Generic;
  using CitizenFX.Core;
  using static CitizenFX.Core.Native.API;
  
  namespace WhereAmIClient
  {
      public class Class1 : BaseScript
      {
      }
  }

Here is my resource file:

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
resource_type 'gametype' { name = 'WhereAmI' }
client_script 'WhereAmIClient.net.dll'

Anyone have any ideas what is going on?

I have fixed the issue.

In one of the tutorials, it suggested this:

If you’re working on your own resources, you’ll probably want to make a resources/[local] directory - this one will be ignored by Git when updating the server-data root. In there, we’ll make a resources/[local]/mymode folder, since we’re making, well, a gametype using the mapmanager system.

I did that but now that I’m looking back, I read multiple tutorials so I don’t know if that was meant specificly for one and not another. They loaded fine but the game/server glitches when I die or try to enter. I ended up just putting them into a folder directly in the resources and it resolved the issue.