--ignore table stuff


workspace.DescendantAdded:Connect(function(WHAT)
	if WHAT:IsA("Accessory") or WHAT:IsA("Hat") or WHAT.Name == "HumanoidRootPart" then
		--print("added "..WHAT.Name)
		table.insert(rayignore, WHAT)
	elseif WHAT:IsA("BasePart") and not WHAT.CanCollide and not WHAT.Parent:FindFirstChildOfClass("Humanoid") then
		--print("found nocollide")
		table.insert(rayignore, WHAT)
	end
end)
workspace.DescendantRemoving:Connect(function(WHAT)
	local findthing = table.find(rayignore, WHAT)
	if findthing then
		--print("removed "..WHAT.Name)
		table.remove(rayignore, findthing)
	end
end)

for i,v in pairs(workspace:GetDescendants()) do
	if v:IsA("Accessory") or v:IsA("Hat") or v.Name == "HumanoidRootPart" then
		--print("added "..v.Name.." on start")
		table.insert(rayignore, v)
	elseif v:IsA("BasePart") and not v.CanCollide and not v.Parent:FindFirstChildOfClass("Humanoid") then
		--print("found nocollide on start")
		table.insert(rayignore, v)
	end
end
