What is CanaryDataService?
CanaryDataService is a data management module I made for my framework, it’s easy to use and very straight-forward.
Videos and Screenshots
Why is this useful and better than other modules?
Well first of all, this uses ProfileService, which is the best data storing method at the time of writing this.
Why not Datastore 2?
Datastore 2 never gets updated, and does not prevent item duplication or data loss. When using my module, item duplication and data loss is fixed and should never happen.
Why not just use ProfileService by itself?
Though ProfileService is simple, and easy to learn, it still can be hard to learn. Personally, it took me a while to completely understand it.
Why should I use it overall?
There’s no need to set up your data and all of that, you get instant access to getter and setter functions. It also reduces how much code your actually writing, which can save tons of time.
Settings Module
First off, the default player key is located here. You need to fill it in in order for this to work. Example:
DefaultPlayerKeys = {
["Money"] = 50; -- key name, default key value
}
The other settings below are self-explanitory.
Documentation (coming soon) & Update Log
–
Quick Poll(s)
- Good job! I will use this in my game!
- Very good, though I have no use for it.
- It’s alright, could be better. (Reply please!)
- This needs serious improvement. (Reply please!)
0 voters
- More API (What kind?)
- Better speed
- Something else (Reply)
- It’s already perfect!
0 voters
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
0 voters
Fill out this survey please: https://forms.gle/kwX8WkASs6BkqN1a6
Code Sample (Creates a leaderboard):
local DataService = require(game:GetService("ServerStorage").CanaryDataService)
local Part = workspace.Part
local Prompt = Part.ProximityPrompt
DataService.DataLoaded:Connect(function(player)
local Leaderstats = Instance.new("Folder")
Leaderstats.Name = "leaderstats"
Leaderstats.Parent = player
local MoneyValue = Instance.new("NumberValue")
MoneyValue.Name = "Money"
MoneyValue.Parent = Leaderstats
MoneyValue.Value = DataService:getKey(player, "Money")
DataService.KeyChanged:Connect(function(_, key, newValue)
if key == "Money" then
MoneyValue.Value = newValue
end
end)
end)
local PromptDebounce = true
Prompt.Triggered:Connect(function(player)
if PromptDebounce then
PromptDebounce = false
DataService:setKey(player, "Money", DataService:getKey(player, "Money") + 50)
print(player.Name .. " now has " .. DataService:getKey(player, "Money") .. " money!")
task.wait(1.5)
PromptDebounce = true
end
end)
Thanks!
Credits
Credit to @stravant for his signal module.
I 100% recommend you use all of these external resources, I personally have had great experience with them.
I might be including global updates soon, but the ProfileService docs are terrible at explaining it.