Profiles
Profiles are the game's approach to storing entity data. There exist different kind of profiles with their own purposes.
Profile
The main profile for a player, which saves across sessions. This profile is used to store data that is relevant to the player, such as their inventory, skills, and stats. This profile is saved to the player's DataStore, and is loaded upon joining the game.
The data is not saved until the player leaves the game, or during a periodic auto-save. It is accessed through ProfileModule.Profiles[Player].
ERROR: Any non-serializable data such as Vector3 or CFrame will cause errors, and should be serialized with ProfileModule.Serialize and read with ProfileModule.Deserialize respectively.
WARNING: It may be nil if accessed in PlayerAdded before the profile is loaded. It is recommended to use ProfileModule.ProfileAdded instead of PlayerAdded.
WARNING: Do not add new fields to the profile without adding them to:
GetDefaultDatafunction insrc\ServerStorage\Modules\Data\ProfileModule.lua- The field type in
src\ServerStorage\Modules\Data\DataModule\DataTypes.lua
CharacterProfile
The profile for a character, which is reset upon spawn & does not save to datastores. Both players and mobs have a character profile. It is accessed through ProfileModule.CharacterProfiles[CharacterModel].