Loading gear without scripts

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

  1. What do you want to achieve? Keep it simple and clear!
    I have a catalogue to sell items to players, but when they ask for gear I want to remove any scripts

  2. What is the issue? Include screenshots / videos if possible!
    in order for gear to work, they need scripts, others can intentionally or unintentionally add code that I don’t want on my server (an admin menu)

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    loading the model → use a script to go through all descendants and remove any scripts
    finding different ways to load the gear
    parenting the model to replicated storage ->remove scripts-> moving to character

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 success, err = pcall(function()
		items = Insert:LoadAsset(productInfo.AssetId)
	end)
	if not success then
		remoteEvent:FireClient(player, "warn", "invalid Id")
		return warn(err)
	end
	for i, descendant in ipairs(items:GetDescendants()) do
		if descendant:IsA("LuaSourceContainer") then
			descendant:Destroy()
		end
	end
.
.
.
	elseif assetTypeId == "19" then
		
		for i,v in pairs (player.Character:GetChildren()) do -- removes any equiped gear
			if v:IsA("Tool") then
				v.Parent = player.Backpack
			end
		end
		local item = items:GetChildren()[1]
		item.Parent = player.Character

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.

Can ‘gears’ even have a ‘Admin Menu’?

what is the problem? You want to remove scripts from gear, correct?
your code seems to do that, does the code not work? if so, is it because an error or does it not solve your problem.

let’s say removing it this way is to slow.
the scripts that come with the gear has already run before I could remove them.

put the gear in a place like server storage, then use a server script to run your code, then you can give it to the player, the scripts in gear won’t run in server storage

1 Like

yes, you can make a banhammer that kicks people of the server.
or even insert whole gui`s if you like
on opening the gear->open the gui
putting gear in backpack->closing the gui