Where to store folder that musn't reset upon death?!

Greetings,

I am making a spell unlocking system. You go to a location on the map, touch a part and unlock the spell. That spell is now permanently yours.

The issue i am having is that i don’t know where to store the folder that contains the list of spells you own, so that it doesn’t reset upon death while at the same time being able to access it with a server script that would check if you already have the spell that the part you are touching is supposed to award you.

I planned to put it into StarterPlayer so that both the local script that allows you to cast the spell and the server script that awards them can reference it, however i soon learned that server scripts can’t access Players.PlayerName.Folder

any advice would be appreciated, thank you for your time

1 Like

Put it inside the player. Just like leaderstats.

5 Likes
  1. My first thought would be to put it into StarterPack, meaning the player spawns with it when the spawn in? I’m not sure if you can add stuff to it at runtime though.
  2. If serverside scripts can’t access something, use remote events.
2 Likes

Put it in PlayerScripts. Then it won’t respawn. You likely put it in the Character or in PlayerGui or Backpack.

2 Likes

No i put it into PlayerScripts for that reason. But serverscript can’t access playerScripts folder

1 Like

So put it in the Player itself like mentioned above at runtime.

2 Likes

I am trying, but i don’t know where to put it so that it ends up in the player. Just putting it into starterPlayer doesn’t make it replicated into the player

1 Like

Yes, so do it at runtime like mentioned. When Players.PlayerAdded fires.

2 Likes

Ok that worked, thank you and everyone who commented

2 Likes