ProfileManager - A free, open source add-on module for ProfileService

ProfileManager - Making Data Saving Possible for Beginners

ProfileManager simplifies ProfileService further with self-explanatory functions, making data saving easier than ever.

Disclaimer: This is all possible thanks to @loleris ProfileService. I am not claiming I did all this work, its thanks to his constant support of the module that any of this is possible, I am simply making functions to save you time and make it easy to beginners that want to save data.


  • Free!
  • Easy!
  • Beginner-friendly!
  • Open-source!

DataManager download:
Download the module!

Its on github too!
Github repo


Here is a quick example, utilizing all of the functions in ProfileManager:
– NOTE: The way I use these functions is not necessarily ideal,
– they are just examples of how you could use them

-- NOTE: The way I use these functions is not necessarily ideal, 
-- they are just examples of how you could use them
local ProfileManager = require(game.ServerScriptService.ProfileManager)

game.Players.PlayerAdded:Connect(function(plr)
	local plrProfile = ProfileManager:LoadPlayerProfile(plr)
	local plrData = ProfileManager:GetDataFromProfile(plrProfile)
	
	print("This should print a table with atleast the default player values:")
	print(plrData)
	
	local bansProfile = ProfileManager:LoadCustomProfile("Custom", "Custom_"..game.PlaceId)
	local bansData = ProfileManager:GetDataFromProfile(bansProfile)
	
	print("This should print a table with the banned people:")
	print(bansData)
	
	bansData.bans[plr.Name] = true
	ProfileManager:ReleaseProfile(bansProfile)
	
	plr.Chatted:Connect(function(msg)
		local requestedPlrId = game.Players:GetUserIdFromNameAsync(msg)
		local requestedPlr = game.Players:GetPlayerByUserId(requestedPlrId)
		
		if requestedPlr and requestedPlr:IsDescendantOf(game.Players) then
			local key = "Player_"..requestedPlr.UserId
			local requestedPlrProfile = ProfileManager:GetProfile(key)
			local requestedPlrData = ProfileManager:GetDataFromProfile(requestedPlrProfile)
			
			print(requestedPlrData)
			
			ProfileManager:ReleaseProfile(requestedPlrProfile)
		end
	end)
end)

game:BindToClose(function()
	ProfileManager:ReleaseAllProfiles()
end)

Thanks! I hope you find this module helpful. I just want to say though, this does not support more advanced things you may want to do with ProfileService, its simply just something that I wish I had when I started, to save basic, basic, data. Once again, this is just a further simplification of ProfileService.


This is my first time ever making a post like this, I hope you find it useful! Please leave anything I need to fix down in the description.

Thanks,
p1ckL

19 Likes

Hey! Try making a git hub for this, and I’m excited to see any progress!

4 Likes

Super epic! Works really well, thanks!

2 Likes

Can you try making the source code available in the github repo too?

I’m not sure what you mean by this, sorry.

He’s asking if you can upload the module onto the github repository

I know this is just a simplification of ProfileService but it doesn’t support global updates, it’s not really that customisable, it also doesn’t support Server-Client replication, some functions aren’t that useful such as ProfileManager:GetDataFromProfile() when you can just do profile.Data. A lot could be improved but it’s not that bad. I had this idea a month ago and two people already made something like this. :sweat_smile:

I made :GetDataFromProfile incase people aren’t aware how ProfileService stores data. But thanks for the feedback!

I recommend adding a profile:IsActive() condition to ProfileManager:GetDataFromProfile just to make sure the profile hasn’t been released yet

function ProfileManager:GetDataFromProfile(profile)
	if profile and profile:IsActive() then
		return profile.Data
	end
end
1 Like

I released a minor update to profile manager.

Fixed/Improved :LoadCustomProfile()

Added an additional safety measure to :GetDataFromProfile() as suggested by @ATrashScripter (thanks!)