--Checks for collisions----------

local function CheckHitbox(Character, Object, Plot)
	if not Object then return false end	
	local CollisionPoints = workspace:GetPartsInPart(Object.PrimaryPart)

	--Checks if there is collision on any object that is not a child and is not the player----------
	for i = 1, #CollisionPoints, 1 do
		if not CollisionPoints[i].CanTouch then continue end
		if not (not CollisionPoints[i]:IsDescendantOf(Object) and not CollisionPoints[i]:IsDescendantOf(Character)) and not (CollisionPoints[i] == Plot) then continue end

		return true
	end

	return false
end
