actually it’s kind of simple, We will make a table for Un-need items (arms, legs, etc) and for Needed items then we will use PlayerAdded
event
local UnNeededItems = {"Right Arm" , "Left Arm" , "Right Leg" , "Left Arm" , "HumanoidRootPart" , "Torso" , "Head"} --// Change It According to the game (R6 or R15) \\--
local NeededItems = {}
game.Players.PlayerAdded:Connect(function(Player)
end)
then we will use CharacterAdded
Event and add a wait(10) do the character fully loads
local UnNeededItems = {"Right Arm" , "Left Arm" , "Right Leg" , "Left Arm" , "HumanoidRootPart" , "Torso" , "Head"} --// Change It According to the game (R6 or R15) \\--
local NeededItems = {}
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
wait(10)
end)
end)
now we will use a for loop to see everything inside the Character
local UnNeededItems = {"Right Arm" , "Left Arm" , "Right Leg" , "Left Arm" , "HumanoidRootPart" , "Torso" , "Head"} --// Change It According to the game (R6 or R15) \\--
local NeededItems = {}
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
wait(10)
for _ , v in pairs(Character:GetChildren()) do
end
end)
end)
now we will use table.find
local UnNeededItems = {"Right Arm" , "Left Arm" , "Right Leg" , "Left Arm" , "HumanoidRootPart" , "Torso" , "Head"} --// Change It According to the game (R6 or R15) \\--
local NeededItems = {}
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
wait(10)
for _ , v in pairs(Character:GetChildren()) do
if not table.find(UnNeededItems , v.Name) then
table.insert(NeededItems , v.Name)
end
end
end)
end)
now you can do whatever you want with them
local UnNeededItems = {"Right Arm" , "Left Arm" , "Right Leg" , "Left Arm" , "HumanoidRootPart" , "Torso" , "Head"} --// Change It According to the game (R6 or R15) \\--
local NeededItems = {}
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
wait(10)
for _ , v in pairs(Character:GetChildren()) do
if not table.find(UnNeededItems , v.Name) then
table.insert(NeededItems , v.Name)
end
end
end)
end)
for i = 1 , #NeededItems do
print(tostring(NeededItems[i])
end