Is it possible to tell if an accessory is a back accessory so that I can remove it from players that enter my game? My game uses backpacks and I don’t want any back accessories that the player is wearing to interfere with them. The best solution I can come up with is iterating through all the accessories in the player and checking if the accessory is being welded to the uppertorso since back accessories are welded to the uppertorso. This method can produce unfavorable results though as other accessories such as front accessories are also welded to the uppertorso.
Yes it is. Iterate through any accessory and find if an attachment name is BodyBackAttachment. I believe there are other types of back attachments, which you can find by opening a humanoid’s torso parts in a test server. That’s if they’re relevant to you.
for _, item in pairs(character:GetChildren()) do
if item:IsA("Accessory") and item:FindFirstChild("BodyBackAttachment", true) then
print(item, "is a back accessory!")
end
end
Obviously there are different ways to go about this. The main takeaway is that you need to search for attachments in accessories with a specific name to determine their type. No other way.
Essentially; you had the answer, but not quite the cleanest solution for it.
6 Likes