Like in murder mystery when you spawn in the lobby you spawn as a noob but have all you clothes and hats and packages all gone. How do you destroy body parts?
COMMUNITY QUESTION
How would you destroy a players body parts (hats,packages,etc.) that you don't know?
2 answers
Have a script that uses the :Destroy() function on body parts every time a player spawns in via :CharacterAdded() or :PlayerAdded().
try this
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function()
wait(2)
local bp = plr.Character:GetChildren()
for i = 1, #bp do
if bp[i]:IsA("Hat") or bp[i]:IsA("Shirt") or bp[i]:IsA("Pants") then
bp[i]:remove()
end
end
end)
end)
1 comment
0
also, don't set the wait to less than 1, or it might not work
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Yes but how do u destroy a hat or package that you don't know what the name is
One way you could do it is use the ClassName property to check if it is a hat or a package. Just do "if x.ClassName == Hat then x:Destroy()" (x is the hat).