#Guys, is there any better way to reset player's data
1 messages · Page 1 of 1 (latest)
i use a datastore plugin to do that
which plugin did you use?
How much does it cost?
6,99, It was free when I got it
what a waste of 6,99 when the roblox dashboard has a built-in datastore manager
how else are you going to reset a player's data other than to set everything to initial values?
note, i specifically say reset and not remove. removal would be like a gdpr request and you would use removeasync for those
like, I actually want to set every player's data to 0
every? why?
what are you trying to do exactly
when it resets, every player's playtime data goes to 0
what are you trying to do exactly
and the answer i'm looking for is not "i'm trying to reset every player's data to 0", the answer involves why you're doing that
because this sounds like an xy problem http://xyproblem.info
The XY problem is asking about your attempted solution rather than your actual problem. This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help.
User wants to do X.
User doesn't know how to do X, but thinks they can fumble their way to a solution if they can just manage to do Y.
User doesn't know how to do Y either.
User asks for help with Y.
Others try to help user with Y, but are confused because Y seems like a strange problem to want to solve.
After much interaction and wasted time, it finally becomes clear that the user really wants help with X, and that Y wasn't even a suitable solution for X.The problem occurs when people get stuck on what they believe is the solution and are unable step back and explain the issue in full.
so, when they rejoin they are gonna exactly have 0 playtime, not just the players who are online and gets subscribed by messaging service
It's like a pet sim x gift, right? so, when I reset the gifts, all the player's playtime will also go to 0, so they can collect the gifts by waiting again
but why would you reset ALL players on the actions of one player?
won't each player have their own gift?
and what does playtime have to do with anything? why is this being reset? you don't want to know how long someone has played your game? wot
try me, i'm pretty good at following stuff like this
code does not tell me what you trying to achieve with this
what, are you trying to do daily login reward?
you don't need to reset all players to make those
well anyway let me know when you decide to say what you're trying to do coz this makes no sense
where?
u can edit the data store table and set the player data to 0
I mean, like
For every players
But, this way seems to be the slowest one
Because Roblox's limitation
if i understand right u wanna do something like psx where u reset the players playtime reward progress on rejoin right?
id use a variable to grab the service/data stores once so you dont call them repeatedly
but honestly the guy above is kinda right im not sure what u really want lol
just do datastore:SetAsync(UserId, nil)
that is incorrect
this will do nothing
use removeasync if you want to set to nil
no it sets the key in the data store to nil aka nothing
I have used this a million times before in my scripts and it has worked every single time
local store = game:GetService("DataStoreService"):GetGlobalDataStore() local data=store:GetAsync("test") print(data) store:SetAsync("test",10) data=store:GetAsync("test") print(data) store:SetAsync("test",nil) data=store:GetAsync("test") print(data)```
> error: Argument 2 missing or nil
setasync(key,nil) errors.
so uh
sure you're not using like profilestore or something?
it might be interpreting nil as removeasync
but setasync definitely errors, there is proof code
local function ResetData(Player: Player)
Session[Player] = {
Owned = {},
Equipped = 0,
}
pcall(function()
CardStore:SetAsync("Card_" .. Player.UserId, Session[Player])
end)
Player:SetAttribute("Card", 0)
end
well this just sets to the deafult values wich work aswell
but like how much free time do you have bro? I see you on discord like 24/7
this doesn't look like setasync(key,nil)
i sometimes leave my computer on, doesn't mean i'm around
datastore:SetAsync(urfather, nil)
does your cat use discord then, beacuse I see you typing aswell
first time I saw you was like 10 months ago
and almost every time I have been in this discord server I have seen you online messaging
i'm doing this work full time