Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I access Stats via Script?

Im wanting to make a command that resets stats but I need to know how, Can someone give an example?

1 answer

✓ Accepted answer

Well, try having a look inside an admin script. Some of them have a command which resets stats. Just like this one I found.

if msg:lower():sub(1,11) == "resetstats " then
local plrz = GetPlr(plr, msg:lower():sub(12))
for i, v in pairs(plrz) do
coroutine.resume(coroutine.create(function()
if v and v:findFirstChild("leaderstats") then
for a, q in pairs(v.leaderstats:children()) do
if q:IsA("IntValue") then q.Value = 0 end
end
end
end))
end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.