I am making a script, but some accessories can’t attach to the wanted area and they just fall on the ground and don’t attach to the player.
How do I detect if a accessory is attached to something or not?
I am making a script, but some accessories can’t attach to the wanted area and they just fall on the ground and don’t attach to the player.
How do I detect if a accessory is attached to something or not?
I’m sorry if I didn’t understand but what are you trying to do more or less exactly or why do you want to know that?
Simple, how do I detect whether or not a accessory is attached to something or if it is not. As in the title.
as far as i know when a player joins they always have the props attached to their head.
Nononono lol I’m asking if you don’t have a head but you have a back. I don’t want to completely leak my game but like just how do I detect if a accessory is attached that is my question.
When an accessory is attached, a Weld gets parented to its Handle.
The best practice would be to chain-check its descendants like this:
local Handle: BasePart? = Accessory:FindFirstChildWhichIsA("BasePart")
local AccessoryWeld: Weld? = if Handle then Handle:FindFirstChildWhichIsA("Weld") else nil
if Handle and AccessoryWeld then
...
end
Better question, how do I detect a accessory type?
I think it is as simple as I check if the accessory’s handle has a ‘AccessoryWeld’. Thank you so much!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.