No idea what's wrong with the fishvalue, I want it other leaderstat but not in leaderstats, I want it like hidden leaderstat which helps script but to not make it visible on leaderstats.. Here is my script
local DataStoreService = game:GetService("DataStoreService")
local CashDS = DataStoreService:GetDataStore("CashDS-")
local IbDS = DataStoreService:GetDataStore("IbDS-")
local CatchesDS = DataStoreService:GetDataStore("CatchesDS-")
local FishValueDS = DataStoreService:GetDataStore("FishValueDS-")
game.Players.PlayerAdded:Connect(function(plr)
local stats = Instance.new("IntValue",plr)
stats.Name = "leaderstats"
local cash = Instance.new("IntValue",stats)
cash.Name = "Cash"
local ib = Instance.new("IntValue",stats)
ib.Name = "InBucket"
local xp = Instance.new("IntValue",stats)
xp.Name = "Catches"
local fv = Instance.new("IntValue",plr)
fv.Name = "FishValue"
cash.Value = CashDS:GetAsync(tostring(plr.userId)) or 0
ib.Value = IbDS:GetAsync(tostring(plr.userId)) or 0
xp.Value = CatchesDS:GetAsync(tostring(plr.userId)) or 0
fv.Value = FishValueDS:GetAsync(tostring(plr.userId)) or 0
CashDS:SetAsync(tostring(plr.userId),cash.Value)
IbDS:SetAsync(tostring(plr.userId), ib.Value)
CatchesDS:SetAsync(tostring(plr.userId), xp.Value)
FishValueDS:SetAsync(tostring(plr.userId),fv.Value)
cash.Changed:connect(function()
CashDS:SetAsync(tostring(plr.userId), cash.Value)
end)
ib.Changed:connect(function()
IbDS:SetAsync(tostring(plr.userId), ib.Value)
end)
xp.Changed:connect(function()
CatchesDS:SetAsync(tostring(plr.userId), xp.Value)
end)
fv.Changed:connect(function()
FishValueDS:SetAsync(tostring(plr.userId), fv.Value)
end)
end)

2 comments
Why are you using individual data stores for each value. You can use one giant data store and save a table instead
I have changed it to one but that doesnt matter