SYNC_RATE:Connect(function()for Q,T in ipairs(ActiveHitboxes)do if T.deleted then Handler:remove(T.object)else for Q,S in ipairs(T.points)do if not T.active then S.LastPosition=nil else local Q,w,t=S.solver:solve(S,T.debugMode)local j=workspace:Raycast(Q,w,T.raycastParams)S.solver:lastPosition(S,t)if j then local Q=j.Instance local w=not T.partMode and Q:FindFirstAncestorOfClass("\077\111\100\101\108")local t=w and w:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")local A=t or T.partMode and Q if A and not T.targetsHit[A]then T.targetsHit[A]=true T.OnHit:Fire(Q,t,j,S.group)end end T.OnUpdate:Fire(S.LastPosition)end end end end end)return Handler
--------
SYNC_RATE:Connect(function()
	for Index, Object in ipairs(ActiveHitboxes) do
		if Object.deleted then
			Handler:remove(Object.object)
		else
			for _, Point in ipairs(Object.points) do
				if not Object.active then
					Point.LastPosition = nil
				else
					local rayStart, rayDir, RelativePointToWorld = Point.solver:solve(Point, Object.debugMode)
					local raycastResult = workspace:Raycast(rayStart, rayDir, Object.raycastParams)
					Point.solver:lastPosition(Point, RelativePointToWorld)

					if raycastResult then
						local hitPart = raycastResult.Instance
						local findModel = not Object.partMode and hitPart:FindFirstAncestorOfClass("Model")
						local humanoid = findModel and findModel:FindFirstChildOfClass("Humanoid")
						local target = humanoid or (Object.partMode and hitPart)

						if target and not Object.targetsHit[target] then
							Object.targetsHit[target] = true
							Object.OnHit:Fire(hitPart, humanoid, raycastResult, Point.group)
						end
					end

					Object.OnUpdate:Fire(Point.LastPosition)
				end
			end
		end
	end
end)

return Handler
