ObjectValue have limit of 1000 per game

ive noticed that whenever i try to add onother objectvalue in my game, the oldest one gets destroyed when the total amount of objectvalues in the game is 1000, why is that and what alternative should i use

maybe you could store it in a table?

what is the best instance that takes least amount of data and have no limit how many u place in the game? (i really need it as an instance in the workspace, and i wont use baseparts)

I dont know your case of use… but you can store instances inside table.

eg.

ModuleScript inside ReplicatedStorage

--init table with a part.
local tbl = {
	game.Workspace:WaitForChild("Part"),
}

local module = {}

module.AddObject = function(obj)
	table.insert(tbl, obj)
end

module.GetAllInstances = function()
	return tbl
end

return module

LocalScript

local module = require(game:GetService("ReplicatedStorage"):WaitForChild("ModuleScript"))
for _, i in pairs(module.GetAllInstances()) do
	i.Color = Color3.new(1, 0, 0.0156863)
end

I need it to be an Instance object in game so that local scripts can use Attribute Changed signal also i noticed, a Player can hold more than a thousands object value, workspace and replicatedstorage cant (i suspect others cant hold higher than 1000 too)

also folders doesnt work, i tried adding more than 1000 folders and it didnt work, the oldest get deleted

Important Note: Normal script and Command Bar can generate more than thousands instances but the module script can only generate total of 1000 instance in game before it starts destroying the oldest

Nvm I found the problem, it seems you can’t put more than 1000 items in game.Debris:AddItem(instance, duration), if you do, the game starts deleting the oldest item added in game.Debris

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.