Okay, Firstly all the stats stuck. As example, If I'll get about 1K Durability then all the stats will be 1K ( Idk why ) 2. I need to know how to reset the datastore 3. Somewhy if I'm trying to reset my own datastore values via the console it's not working My script :
local Rep = game:GetService("ReplicatedStorage")
local DataStore2 = require(Rep:WaitForChild("MainModule"))
DataStore2.Combine = {"DATA", "Strength", "Durability", "Prestige"}
local DefaultDura = 0
game.Players.PlayerAdded:Connect(function(player)
local StrengthDataStore = DataStore2("Strength",player)
local DurablityDataStore = DataStore2("Duability",player)
local PrestigeDataStore = DataStore2("Prestige",player)
-- LeaderStats
local Stats = Instance.new("Folder", player)
Stats.Name = "leaderstats"
local Strength = Instance.new("IntValue", Stats)
Strength.Name = "Strength"
local Durability = Instance.new("IntValue", Stats)
Durability.Name = "Durability"
local Prestige = Instance.new("IntValue", Stats)
Prestige.Name = "Prestige"
local Req = Instance.new("IntValue", player)
Req.Name = "Req"
local ReqStr = Instance.new("IntValue", Req)
ReqStr.Name = "ReqStr"
local ReqDura = Instance.new("IntValue", Req)
ReqDura.Name = "ReqDura"
local function StatsUpdate(newValue)
Strength.Value = StrengthDataStore:Get(newValue)
Durability.Value = DurablityDataStore:Get(newValue)
Prestige.Value = PrestigeDataStore:Get(newValue)
end
StatsUpdate()
StrengthDataStore:OnUpdate(StatsUpdate)
DurablityDataStore:OnUpdate(StatsUpdate)
PrestigeDataStore:OnUpdate(StatsUpdate)
end)
