Hello! ok, so in my game i have 2 currencies, Coins & Orbs.
I need help resetting everyone’s Orbs.
Does anyone know how i can do that? Thanks!!!
Hello! ok, so in my game i have 2 currencies, Coins & Orbs.
I need help resetting everyone’s Orbs.
Does anyone know how i can do that? Thanks!!!
Could you please provide the script you currently have?
If you’re using regular leaderstats, you can iterate through every player and set their value.
for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
local stats = player:FindFirstChild("leaderstats")
if (stats ~= nil) then
local orbs = stats:FindFirstChild("Orbs")
if (orbs ~= nil) then
orbs.Value = 0
end
end
end
What script? leaderstats script?
ok, so would i put that in the command bar?
Do you want to reset the orb stats once or do you want to create like a button that wipes data?
just wanna reset it once.
30 chars
If you change the name of the
“ChangeThisName”
local orb = DataStoreService:GetDataStore(“ChangeThisName”)
It pretty much works as creating an entirely new datastore. Doesn’t wipe the data from the original but it works.
what do i change “ChangeThisName” to?
Whatever you like as long as it is not the same as the name for your Coins save or original Orb save.
wait where do i put the script XD?
ServerScriptService. Where did you originally put it .-.