How do I get the accessories that are in the players character?

So Basically I need to get the accessories in the players character.
Not the PLAYERS accessories.

I need to get the accessories in the workspace, The ones in the character model.
So I can ignore them with a raycast. Thanks!

maybe do something like this

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Accessories = {}

repeat   -- can do this few ways also depends on if the script is on the server but wait for the accessories to load
task.wait(1)
until Player:HasAppearanceLoaded()

for i, child in ipairs(Character:GetChildren()) do
	if child:IsA('Accessory') then
		table.insert(Accessories,child) -- add it to the table 
	end
end
print(Accessories)

Also you can use the Humanoid to get an array