Trying to use game:GetObjects to insert free models into my game

You can write your topic however you want, but you need to answer these questions:

  1. Trying to use game:GetObjects to insert free models into my game. Keep it simple and clear!

  2. SerializerPugi::deserializeImpl no version number. I get this error, I have no idea what it means. Include screenshots / videos if possible!

  3. Tried changing code to something else, didn’t work. Did you look for solutions on the Developer Hub?

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local toolbar = plugin:CreateToolbar("Free Model Adder")
local newScriptButton = toolbar:CreateButton("Adds 200 pages of free models to your game.", "Your not gonna like this.", "rbxassetid://4458901886")
	local InsertService = game:GetService("InsertService")
	local ChangeHistoryService = game:GetService("ChangeHistoryService")
	for i = 1, 200 do
		local page = unpack(InsertService:GetFreeModels("", i))
		for i2 = 1,page.TotalCount do 
			local item = page.Results[i2]
			print("Item #"..i2)
			for i,v in pairs(item) do
				print(" " .. i .. ":" .. v)
				local objects = game:GetObjects("rbxassetid://"..item.AssetId)
				objects[1].Parent = workspace
				ChangeHistoryService:SetWaypoint("Added asset.")

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

What line is this error on? Also, can you show a screenshot of the error+explorer? “SerializerPugi” sounds like a user-generated thing, but I’m not sure.


Are you trying to get a few specific free models or are you trying to grab random free models?

Random free models. (30 chars)

Theres an issue with me using the beta where the script number error line isnt even showing up on the right.

Okay, I’m afraid I probably can’t help you then. Sorry for being unable to help.

Oh wait, its on line 13. (30 chars)

1 Like

I just thought about this, but you should be careful if you are going to pull in random free models into your game. They can contain malicious scripts, copyrighted content, or other harmful/illegal content. I wouldn’t recommend doing this.

I don’t actually care, this is just an experiment to get me familiar with game:GetObjects()
This will never be published. And it will be reverted as soon as I get this to work.
Besides, this isnt a functioning game anyway, its just for testing.

In that case, you are probably fine, but I felt that it was important you were made aware of the risks involved.

I know, free models can have viruses now a days and it’s pretty sad.