I am working on a game and i have come across a bug i think i have a string with 200k characters and i am trying to get a character i already found a thing that should work but it doesn’t seam to work i get the error ServerScriptService.Remote:6: attempt to call a nil value.
this is the code i have
´´´
game.ReplicatedStorage.Remote.GetItemCountFromId.OnServerInvoke = function(player, id)
local inventory = game.Players:FindFirstChild(player.Name).stats.inventory.Value
local value = “”
for i = (id - 1) * 10 + 1, id * 10 do
value = (value)..(string.at(inventory, i))
end
return tonumber(value)
end
´´´
the inventory string is just zero’s 200k of them.
it is called from a local script.
i don’t need to know why it doesn’t work i just need a solution.
the id = 1 in this case
i am trying to get 10 charactors of the inventory and the id is what says the starting point so when id is 1 the charactors 1-10 are returned as a number. and when id is 2 it is the characters 11-20