Hello there fellow Robloxians!
Today I’d like to publish a session tools module I made last weekend, as it is my first ever module I would highly appreciate any critique or feedback that you got for me
What is it?
The session tools module is a module which allows users to keep their inventory after death, only session wise as it does not use any datastore, however server cache is available.
If server cache is enabled, then the specific server which the user is playing on will keep the user’s inventory and give it back to them if they join back onto the same server.
The server cache feature is therefore useful for times when the player lost connection to the server and has to rejoin.
How do I use it?
To use the module you just have download and insert the .RBXM file into Roblox studio or get the model from the creator marketplace.
After the folder has been inserted into studio you have to configue the DefaultTools and ToolStorage folders with the tools you are using.
Put every tool you want to be saveable into the ToolStorage folder and put starter tools, if any, into the DefaultTools folder. If you got one life tools which you do not want to be saved, then just keep them out of ToolStorage.
That’s all you have to do as the download comes with a pre-installed test script which runs the module’s .INITIALIZE function, check it out!
The test script:
local Players = game:GetService("Players")
Players.RespawnTime = .8
local SessionTools = require(script.SessionTools)
Players.PlayerAdded:Connect(SessionTools.INITIALIZE)
for _,player in pairs(Players:GetPlayers()) do
task.spawn(function() SessionTools.INITIALIZE(player) end)
end
SETTINGS ARE LOCATED IN A CONFIGURATION PARENTED TO MODULE:
- DefaultTools & StoragePath are ObjectValues
- ServerCache is a BoolValue
The DefaulTools settings value equals the DefaultTools folder, set by default. The StoragePath settings value equals the ToolStorage folder, set by default.
The ServerCache is a boolean, when set to true it will save players inventory on the specific server, otherwise it will throw the data away when the player leaves the server, set to false by default.
As stated before, feedback and critique about the module is highly appreciated as it is my first ever module!