You can write your topic however you want, but you need to answer these questions:
-
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 -
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) -
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.