How would I go about making a Questing System?

Well, which one do you think would be better? As I want to store a large amount of items, I find it quite hard to make a datastore for each one manually. And I do come across that error quite alot " [DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 280300094]"

Here’s an example of Datastore manager (I made for a freind to use) You make a table(In this case PlayerStatistics_EXAMPLE ) for the functions to edit and to edit data you would just call on the module and call the function you want to use.

Also noticed that was better to require the module from within your game and that using this

local DataStore2 = require(1936396537)

would cause my game to yield till it found thee datastore2 module

Summary
PlayerStats_DataStore = {}
local DataStore2 = require(1936396537)-- Datastore2 

local PlayerStatistics_EXAMPLE = {
	Strength = 0, -- Damage Dealt, How much weight can be lifted.
	Stamina = 0, -- How long you can fight without fatigue, how long you can run.
	PunchingSpeed = 0, -- How fast you punch.
	Speed = 0, -- How fast you run/how fast you move in the boxing ring
	Endurance = 0, -- How much Health the player has
	MuscleMass = 0,--(Maxes at 10) 
}


function PlayerStats_DataStore:SaveStats(Player)  -- PlayerStats_DataStore:SaveStats(Player)	Saves Data for (Player)							
	local Stats = DataStore2("Change this to what ever you want", Player)
	Stats:Save()
end


function PlayerStats_DataStore:GetStat(Player,Name_Of_Stat)
	local Stats = DataStore2("Change this to what ever you want", Player)
	local PlayerStatistics = Stats:GetTable(PlayerStatistics_EXAMPLE)
	return PlayerStatistics[Name_Of_Stat]
end



function PlayerStats_DataStore:AddToStat(Player,Name_Of_Stat,Amount)  -- Adds Amount onto Data Indexing(Player) and Adding(AMOUNT) to (Name_Of_Stat)
	local Stats = DataStore2("Change this to what ever you want", Player)
	local PlayerStatistics = Stats:GetTable(PlayerStatistics_EXAMPLE)
		Stats:Update(function(PlayerStatistics)
			PlayerStatistics[Name_Of_Stat] = PlayerStatistics[Name_Of_Stat] + Amount
			return PlayerStatistics
		end)
		print(Name_Of_Stat .." : "..PlayerStatistics[Name_Of_Stat].. 'Added to '..Player.Name)
end

function PlayerStats_DataStore:SetStat(Player,Name_Of_Stat,Value)  -- Sets Value onto Data Indexing(Player) and Setting(Value) to (Name_Of_Stat)
	local Stats = DataStore2("Change this to what ever you want", Player)
	local PlayerStatistics = Stats:GetTable(PlayerStatistics_EXAMPLE)
		Stats:Update(function(PlayerStatistics)
			PlayerStatistics[Name_Of_Stat] = Value
			return PlayerStatistics
		end)		
	PlayerStats_DataStore:SaveStats(Player)
end


function PlayerStats_DataStore:SetupNewData(Player)
	local Stats = DataStore2("Change this to what ever you want", Player)
	local PlayerStatistics = Stats:Get(PlayerStatistics_EXAMPLE)
		Stats:Update(function(PlayerStatistics)
			PlayerStatistics = PlayerStatistics_EXAMPLE
			return PlayerStatistics
		end)
	print('NewData is setup for ' ..Player.Name)
Stats:Save()
end

function PlayerStats_DataStore:SetupStats(Player)
	local Stats = DataStore2("Change this to what ever you want", Player)
	local Data = Stats:Get(nil)
	
	if Data	then

	else -- If there is no Data for player 
		warn('There is no Data for '.. Player.Name..' No Worries...	 Setting Up Data')
			PlayerStats_DataStore:SetupNewData(Player)
	end	
end


 return PlayerStats_DataStore

I see, so I can just keep adding values into that table? and also, which one do you think would be better? DS2 or PF As I want to store a large amount of items, I find it quite hard to make a datastore for each one manually. And I do come across that error quite alot " [DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 280300094]"

you got this because you made too many datastores and you don’t get an infinite amount of request to the datastore

the number of items won’t affect your datastore just be mindful of Data Stores | Roblox Creator Documentation just try not to approach the max limit of data allowed ( which had a increase a long whole ago so don’t be too worried)

Hmm, then in this case should I use profile service or datastore 2? I had to use multiple datastores for DS2 because I was saving many things

That’s up to you, If you would like to try PF you should. I would recommend it gives a lot of freedom and a lot of nice additional features. But you need to know how to edit and create tables and how to create functions for editing said datatables.

Hmm. Then in this case I should move towards datastore2

do u have a discord?

We still havent’t visited the root of this post also.
Yes. Its Extrenious-Sama#9849.

Are you okay if we chat there? I think its more efficient

Sure ------------------------------

1 Like