#datastore
44 messages · Page 1 of 1 (latest)
leaderstats is a good place to STORE data ?
They are not the best places to store data. Also a datastore is used for saving data
ye but datastore saves an already existing data which is located somewhere
leaderstats is a folder, you can save data from everything, there is no best type. It depends mainly of your data store script
but scripters can't edit their leaderstats folder ?
my bad, I mean exploiters
oh nono
Is player service accessible by the client side
ok
today it's even more complicated since roblox did a collab with synapse x exploit
lol wtf
exploiting became really complicated
It's a nice thing for devs
indeed
I prefer scripting via a data managing module. I think they’re easier to access via different scripts
like a teamplate ?
Teamplate?
I saw some devs using profile service library for datastoring. They used several scripts to manage theirs datas, like a teamplate, a manager and a state module script. I'm trying to figure out how it all works together but it's tricky.
It’s really dependent on the kind of game you’re making
e.g. a tycoon can easily get away with a single module handling data. But some larger ones try to split their data up into different types of data
im currently trying to make a checkpoint system
** You are now Level 3! **
so that when you step on a checkpoint
itll save
and when you rejoin you go back to that checkpoint
but what i currently have isnt working
I'm making a tycoon what a coincidence, so you think I should store all my datas in a module script ?
I would just use a module yeag
btw @stoic flint i have the script written down, just that somethings not workign i just need help
Alright, send script
im going to bed in a sec, ill send the script tho
should i add you collab to the game?
Nope, I don't want any collabs atm
here :
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("ObbyDataStore")
game.Players.PlayerAdded:Connect(function(player)
local data
local success, errorMessage = pcall(function()
data = DataStore:GetAsync(player.UserId.."-stage")
end)
if success then
print("Success")
if data then
print("Test1")
player.Team = game.Teams[data]
else
print("Test2")
player.Team = game.Teams.Stage1
end
else
print(errorMessage)
player.Team = game.Teams.Stage1
end
player:LoadCharacterWithHumanoidDefaults()
end)
game.Players.PlayerRemoving:Connect(function(player)
local teamName = player.Team.Name
local success, errorMessage = pcall(function()
DataStore:SetAsync(player.UserId.."-stage", teamName)
end)
if success then
print("All went well")
else
print(errorMessage)
end
end)
i mean it was just so that u could work on it since i have to go
but ok
I'll do this when I come home back from school
For now I'm hoping somebody would take my place
im gonna be home in 18 hours